Releases: ne4ta/Cachula
Cachula v0.1.0-beta.5
✨ Highlights
Added .NET 10 support across all Cachula packages. Dependencies were updated to align with the latest platform versions.
- New target framework: net10.0
- Updated Microsoft.Extensions.*.Abstractions dependencies to 9.x–10.x compatible ranges
💥 Breaking Changes
- None. Public APIs remain source/binary compatible.
Cachula v0.1.0-beta.4
✨ Highlights
Reduced dependency footprint — Cachula no longer depends on the full Microsoft.Extensions.DependencyInjection package.
Now only Microsoft.Extensions.DependencyInjection.Abstractions is required, making integration cleaner and more lightweight for library consumers.
💥 Breaking Changes
- None. Public APIs remain source/binary compatible.
Cachula v0.1.0-beta.3
✨ Highlights
- CachulaBuilder and Redis integration extension: build a working cache in one line. Good for integration tests (Testcontainers) and samples.
- Stable CI for mixed concurrency tests: tests now use deterministic start barriers to verify true single-flight per key under overlap.
Changes
👉 New Features
-
feat(Cachula): add
CachulaBuilder- Fluent builder to assemble a cache with layers and stampede protection.
- Defaults: ensures
NullCacheLayeris first; usesInMemorySingleFlightProtectorunless overridden viaWithStampedeProtector(...). - API:
var cache = new CachulaBuilder() .WithLayer(myLayer) .WithStampedeProtector(myProtector) .Build();
-
feat(Cachula.Redis): add
CachulaBuilderExtensions.WithRedis(...)- One-liner to plug Redis into the builder.
- API:
var cache = new CachulaBuilder() .WithRedis(db /* IDatabase */, settings: new CachulaRedisCacheSettings { BatchSize = 128 }) .Build();
💥 Breaking Changes
- None. Public APIs remain source/binary compatible.
Cachula v0.1.0-beta.2
✨ Highlights
- Configurable Redis batching size: tune batch size for bulk operations to balance throughput and latency.
- Fixed a rare race between
RunAsyncandRunManyAsyncensuring true single-flight per key even under mixed concurrency.
Changes
👉 New Features
- feat(Cachula.Redis): make
CachulaRedisCacheSettings.BatchSizeconfigurable- You can now set the maximum batch size for Redis operations.
🐞 Fixes
- fix(Cachula.Core): ensure single-flight across
RunAsyncandRunManyAsync- Eliminates a race in
InMemorySingleFlightProtectorwhere, in rare cases, the loader could run twice for the same key if single and batch calls overlapped. - Symptom: flaky CI failures in
RunAsync_And_RunManyAsync_IntersectingAndNonIntersectingKeys_OnlyOneLoaderPerKeywith the call count for akey > 1.
- Eliminates a race in
💥 Breaking Changes
- None. Public APIs are unchanged; behavior is now more predictable under contention.
📝 Example: configuring BatchSize in Cachula.Redis
var settings = new CachulaRedisCacheSettings
{
BatchSize = 128
};
var cache = new CachulaRedisCache(connectionMultiplexer, settings: settings);Cachula 0.1.0-beta.1 - Initial Release
✨ Key Features
Multi-layer caching: combine multiple cache layers (memory + Redis) for optimal performance and reliability.
Bulk operations: native support for GetManyAsync, SetManyAsync and RemoveManyAsync to work with multiple keys efficiently.
Cache stampede protection: in-memory single-flight mechanism to avoid redundant concurrent loads.
Null/miss handling: differentiates between “value is null” and “key not found.”
Dependency Injection ready: extension methods PutOnCachula(), WithMemoryCache(), WithDistributedCache().
🚀 Supported Cache Layers
In-Memory Cache Layer based on IMemoryCache.
Redis Cache Layer using StackExchange.Redis with batch operations.
📦 Packages
Cachula: core and in-memory layer.
Cachula.Redis: Redis provider.