Baubit.Caching.Extensions
2026.1.1
See the version list below for details.
dotnet add package Baubit.Caching.Extensions --version 2026.1.1
NuGet\Install-Package Baubit.Caching.Extensions -Version 2026.1.1
<PackageReference Include="Baubit.Caching.Extensions" Version="2026.1.1" />
<PackageVersion Include="Baubit.Caching.Extensions" Version="2026.1.1" />
<PackageReference Include="Baubit.Caching.Extensions" />
paket add Baubit.Caching.Extensions --version 2026.1.1
#r "nuget: Baubit.Caching.Extensions, 2026.1.1"
#:package Baubit.Caching.Extensions@2026.1.1
#addin nuget:?package=Baubit.Caching.Extensions&version=2026.1.1
#tool nuget:?package=Baubit.Caching.Extensions&version=2026.1.1
Baubit.Caching.Extensions
Backward-compatible type specializations for Baubit.Caching with concrete ID types (long and Guid).
Why This Package Exists
Baubit.Caching v2025.52+ introduced generic ID types (TId) for maximum flexibility. While this makes the core library more powerful, it adds complexity for simple use cases.
This package bridges the gap by providing concrete type specializations that:
- Maintain backward compatibility for projects using primitive IDs (
long,Guid) - Reduce boilerplate - no generic type parameters on every declaration
- Keep Baubit.Caching's core surface area minimal while supporting common scenarios
Installation
dotnet add package Baubit.Caching.Extensions
Quick Comparison
Generic API (Baubit.Caching)
// Generic - flexible but verbose
OrderedCache<Guid, MyData> cache = new OrderedCache<Guid, MyData>(...);
IOrderedCache<Guid, MyData> myCache = cache;
Specialized API (Baubit.Caching.Extensions)
// Specialized - simpler for common cases
using Baubit.Caching.Extensions.Guid7;
OrderedCache<MyData> cache = new OrderedCache<MyData>(...);
IOrderedCache<MyData> myCache = cache;
What's Included
1. Guid7 Namespace - GuidV7-based IDs
Use when: You need time-ordered, globally unique identifiers.
using Baubit.Caching.Extensions.Guid7;
using Baubit.Caching.Extensions.Guid7.InMemory;
using Baubit.Identity;
var config = new Configuration { MaxL1Capacity = 100 };
var generator = GuidV7Generator.CreateNew();
var l1Store = new Store<string>(generator, loggerFactory);
var l2Store = new Store<string>(generator, loggerFactory);
var metadata = new Metadata(config, loggerFactory);
var cache = new OrderedCache<string>(config, l1Store, l2Store, metadata, loggerFactory);
Types provided:
OrderedCache<TValue>→OrderedCache<Guid, TValue>IOrderedCache<TValue>→IOrderedCache<Guid, TValue>IStore<TValue>→IStore<Guid, TValue>IMetadata→IMetadata<Guid>CacheEnumeratorCollection→CacheEnumeratorCollection<Guid>ICacheAsyncEnumeratorFactory<TValue>→ICacheAsyncEnumeratorFactory<Guid, TValue>ICacheEnumerator→ICacheEnumerator<Guid>InMemory.Store<TValue>→InMemory.Store<Guid, TValue>InMemory.Metadata→InMemory.Metadata<Guid>InMemory.Entry<TValue>→InMemory.Entry<Guid, TValue>
2. Long Namespace - Sequential Integer IDs
Use when: You need simple, sequential numeric identifiers.
using Baubit.Caching.Extensions.Long;
using Baubit.Caching.Extensions.Long.InMemory;
var config = new Configuration { MaxL1Capacity = 100 };
var l1Store = new Store<string>(loggerFactory);
var l2Store = new Store<string>(loggerFactory);
var metadata = new Metadata(config, loggerFactory);
var cache = new OrderedCache<string>(config, l1Store, l2Store, metadata, loggerFactory);
Types provided:
OrderedCache<TValue>→OrderedCache<long, TValue>IOrderedCache<TValue>→IOrderedCache<long, TValue>IStore<TValue>→IStore<long, TValue>IMetadata→IMetadata<long>CacheEnumeratorCollection→CacheEnumeratorCollection<long>ICacheAsyncEnumeratorFactory<TValue>→ICacheAsyncEnumeratorFactory<long, TValue>ICacheEnumerator→ICacheEnumerator<long>InMemory.Store<TValue>→InMemory.Store<long, TValue>InMemory.Metadata→InMemory.Metadata<long>InMemory.Entry<TValue>→InMemory.Entry<long, TValue>
Key Differences
ID Generation
Guid7 (GuidV7)
- Auto-generated: Pass
IIdentityGeneratortoStoreconstructor - Time-ordered: IDs naturally sort chronologically
- Globally unique: Safe for distributed systems
var generator = IdentityGenerator.CreateNew();
var store = new Store<string>(generator, loggerFactory);
Long (Sequential)
- Auto-generated: Starts at 1, increments by 1
- Sequential: IDs are monotonically increasing integers
- Compact: Smaller memory footprint than GUIDs
var store = new Store<string>(loggerFactory); // No generator needed
Migration Guide
From Generic Baubit.Caching
Before:
using Baubit.Caching;
OrderedCache<Guid, MyData> cache = new OrderedCache<Guid, MyData>(...);
IOrderedCache<Guid, MyData> iCache = cache;
After:
using Baubit.Caching.Extensions.Guid7;
OrderedCache<MyData> cache = new OrderedCache<MyData>(...);
IOrderedCache<MyData> iCache = cache;
Namespace Mapping
| Generic Type | Guid7 Specialization | Long Specialization |
|---|---|---|
OrderedCache<Guid, T> |
Guid7.OrderedCache<T> |
- |
OrderedCache<long, T> |
- | Long.OrderedCache<T> |
IStore<Guid, T> |
Guid7.IStore<T> |
- |
IStore<long, T> |
- | Long.IStore<T> |
IMetadata<Guid> |
Guid7.IMetadata |
- |
IMetadata<long> |
- | Long.IMetadata |
When NOT to Use This Package
- Custom ID types: If you need
int,string, or custom structs as IDs → use Baubit.Caching directly - Maximum flexibility: If you want full control over generic type parameters → use Baubit.Caching directly
- Mixed ID types: If you need multiple cache types with different IDs in same project → use Baubit.Caching directly
For the Full Story
This package is a thin compatibility layer. For complete documentation, see:
Topics covered there:
- Architecture and design rationale
- Complete API reference with examples
- Performance characteristics and benchmarks
- Thread safety guarantees
- Multi-consumer streaming patterns
- Async enumeration
- Eviction strategies
- Configuration options
License
MIT License - see LICENSE file for details.
Contributing
Contributions welcome! Please:
- Read Baubit.Caching's architecture first
- Keep changes minimal - this is a compatibility layer
- Maintain 100% test coverage
- Follow existing code style
Version Compatibility
This package tracks Baubit.Caching versions:
Baubit.Caching.Extensions 2025.52.x→Baubit.Caching 2025.52.x- Always use matching versions to avoid breaking changes
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Baubit.Caching (>= 2026.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2026.1.2-prerelease | 212 | 1/3/2026 |
| 2026.1.1 | 277 | 12/31/2025 |
| 2026.1.1-prerelease | 84 | 12/31/2025 |
| 2025.52.4-prerelease | 90 | 12/27/2025 |
| 2025.52.3-prerelease | 86 | 12/27/2025 |
| 2025.52.2-prerelease | 99 | 12/26/2025 |
| 2025.52.1-prerelease | 143 | 12/26/2025 |