Changelog

circle-info

With the version 2.0.9, the redis cache implementation has changed for better performance, to increase performance on redis cache operations, please update the package version to 2.0.9 and apply the IConnectionMultiplexer registeration on Prgram.cs file shown at https://app.gitbook.com/o/KcD9fWVdHv2Q5V075tYT/s/1gvCT6GY5YmzyoZihAf1/~/changes/29/cache-helpers/ren-cache-helper/ren-redis-cache-service/standard-implementation-of-ren-redis-cache-service

Version 1.6.3

  • Added ExistsAsync(string cacheKey, CancellationToken cancellationToken = default) to check key existence in the underlying cache.

  • Added RefreshAsync(string cacheKey, TimeSpan? absoluteExpiration = null, CancellationToken cancellationToken = default) to refresh/touch key TTL (best-effort across providers).

  • Added RemoveManyAsync(IEnumerable<string> keys, CancellationToken cancellationToken = default) for bulk key removal.

  • Added IncrementAsync(string cacheKey, long by = 1, TimeSpan? absoluteExpiration = null, CancellationToken cancellationToken = default) for atomic counters (TTL best-effort).

  • Added HashGetManyAsync<T>(string key, IEnumerable<string> fields, CancellationToken cancellationToken = default) to fetch multiple hash fields in one call.

  • Added HashSetManyAsync<T>(string key, IReadOnlyCollection<KeyValuePair<string, T>> items, TimeSpan? absoluteExpiration = null, CancellationToken cancellationToken = default) for bulk hash writes (TTL on hash key).

  • Added SetBytesManyAsync(IReadOnlyCollection<KeyValuePair<string, byte[]>> items, TimeSpan? absoluteExpiration = null, CancellationToken cancellationToken = default) for bulk binary writes.

  • Added XML documentation (<summary>, <param>, <returns>) across the interface for better IntelliSense/packaging.

  • Implemented GetBytesManyAsync in RENInMemoryCacheService to match Redis semantics (missing keys return null values).

Notes

  • In-memory provider throws NotSupportedException for hash operations (Redis-only feature set).

Version 1.6.4

  • Added configurable CacheService lifetime (Singleton, Scoped, Transient)

  • Fixed cache registration always defaulting to Scoped

  • Enabled safe usage of cache services in background services and singleton consumers

  • Improved Redis caching integration for high-throughput, real-time systems

  • No breaking changes for existing users (default lifetime remains Scoped)

Version 1.6.5

  • Added new UseDefaultAbsoluteExpirationWhenNull flag that introduces a new configuration flag that allows you to disable automatic default expiration when absoluteExpiration is not provided.

Last updated