Namespace JD.AI.Core.Caching
Classes
- CacheMetrics
OpenTelemetry metrics for the caching layer.
- CacheServiceExtensions
Convenience extensions for working with string values.
- InMemoryCacheService
In-process cache implementation using ConcurrentDictionary<TKey, TValue>. Suitable for single-node deployments. Entries expire based on TTL. A background sweep periodically removes expired entries.
- ToolResultCache
Caches deterministic tool results to avoid redundant invocations. Tools must be explicitly registered as cacheable. Cache keys are derived from tool name + arguments hash.
Interfaces
- IDistributedCacheService
Generic distributed cache abstraction. Implementations may use in-memory, Redis, or other backing stores. All keys are string-based; values are serialized to/from byte arrays.