Skip to content

Releases: ne4ta/Cachula

Cachula v0.1.0-beta.5

28 Jan 08:27

Choose a tag to compare

Cachula v0.1.0-beta.5 Pre-release
Pre-release

✨ 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

22 Oct 10:25

Choose a tag to compare

Cachula v0.1.0-beta.4 Pre-release
Pre-release

✨ 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

21 Oct 15:20

Choose a tag to compare

Cachula v0.1.0-beta.3 Pre-release
Pre-release

✨ 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 NullCacheLayer is first; uses InMemorySingleFlightProtector unless overridden via WithStampedeProtector(...).
    • 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

20 Aug 21:12

Choose a tag to compare

Cachula v0.1.0-beta.2 Pre-release
Pre-release

✨ Highlights

  • Configurable Redis batching size: tune batch size for bulk operations to balance throughput and latency.
  • Fixed a rare race between RunAsync and RunManyAsync ensuring true single-flight per key even under mixed concurrency.

Changes

👉 New Features

  • feat(Cachula.Redis): make CachulaRedisCacheSettings.BatchSize configurable
    • You can now set the maximum batch size for Redis operations.

🐞 Fixes

  • fix(Cachula.Core): ensure single-flight across RunAsync and RunManyAsync
    • Eliminates a race in InMemorySingleFlightProtector where, 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_OnlyOneLoaderPerKey with the call count for a key > 1.

💥 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

10 Aug 21:49

Choose a tag to compare

Pre-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.