Releases: chunty/CleverCache
Releases · chunty/CleverCache
v2.0.1-preview.6
Changes
- Default cache lifetime is now a 4 hour sliding expiration.
- Add
CleverCacheOptions.DefaultEntryOptionsto change the global default duringAddCleverCache(...). - Add
[AutoCache]expiration overrides withSlidingExpirationSecondsandAbsoluteExpirationSeconds. - The new behavior applies across the existing cache stores.
v2.0.1-preview.5
What's changed
- Added type-specific
ICacheKeyProvider<T>support with optional assembly scanning. - Improved canonical key identity for provider-based keys to include source request type and provider type.
- Added risky key-shape detection (delegate/expression/queryable), with warning + cache-skip behavior.
- Updated tests and docs, including a dedicated Cache Key Providers wiki page and highlighted warnings in MediatR/Caching docs.
Validation
- Full solution test suite passing.
v2.0.1-preview.4
What's changed
- Canonicalized cache key identity to use type identity + serialized data across CleverCache internals.
- Equivalent object instances with the same data now map to the same cache entry.
- Type identity now includes namespace + assembly name to avoid collisions between different key types with similar payloads.
- Updated diagnostics to emit canonical keys in
KeysByType(exactly what cache uses internally). - Updated service/store/tests to use canonical keys consistently for lookup, locking, tracking, invalidation, and distributed cache operations.
Fixes included
- Corrected regression introduced during diagnostics refactor and aligned test coverage for canonical diagnostics output.
v2.0.1-preview.3
What's changed
- Improved diagnostics key formatting so complex object keys render as readable object snapshots.
- Materialized deferred enumerable properties in diagnostic keys, so values are shown instead of runtime iterator type names.
- Kept diagnostics behavior unchanged for duplicate keys (no deduplication), as requested.
- Added regression coverage to ensure deferred enumerable keys are emitted in readable, serialization-safe form.
Example improvement
Before:
Names = System.Linq.Enumerable+ListSelectIterator...
After:
Names = ["Size", "Color"]
v2.0.1-preview.2
What's changed
- Fixed diagnostics serialization so
cache.GetDiagnostics()is safe to return from API endpoints using JSON serializers. - Diagnostics now projects complex cache keys (for example delegates/expressions) to JSON-safe values instead of exposing raw runtime objects that can contain circular references.
- Added a regression test to ensure complex keys in diagnostics are emitted as serializable text values.
Why this preview
This preview addresses JsonSerializationException self-referencing loop failures when exposing diagnostics directly via endpoints like:
public IActionResult Get() => Ok(cache.GetDiagnostics());v2.0.1-preview.1
CleverCache v2.0.1-preview.1
Changes
- Disabled async keyed-lock race condition guard by default (
EnableAsyncRaceConditionGuardoption inCleverCacheOptions, defaults tofalse) - Guard can be re-enabled via
options.EnableAsyncRaceConditionGuard = true - Versioning now driven by MinVer from git tags