HAKOM.Persistence.Core.Net.Api.Caching Namespace
Provides caching abstractions and base implementations for reducing the number of storage access operations by keeping frequently used data in memory.
The caching system is built around the following types:
- ICache<TCacheEntry> — The primary caching interface that supports get-or-create semantics, scoped caching, and various deletion strategies. Backed by Microsoft.Extensions.Caching.Memory.IMemoryCache.
- ICacheKeyGenerator<TCacheEntry> — Generates unique cache keys for items of a specific type, supporting lookup by multiple properties.
- CacheKeyGenerator<TCacheEntry> — Abstract base class for cache key generators, providing the key formatting logic.
- ILookupKeyCollection<TCacheEntry> — Maintains the mapping between lookup keys and internal cache entry identifiers.
| Classes | |
|---|---|
| CacheKeyGenerator<TCacheEntry> | Provides a base class for implementations of ICacheKeyGenerator<TCacheEntry> using one or more keys derived from an instance of the type. |
| Interfaces | |
|---|---|
| ICache<TCacheEntry> | Represents some form of caching that can be used to circumvent slower storage media for retrieval of items of a specific type. |
| ICacheKeyGenerator<TCacheEntry> | Provides one or more unique keys identifying an item of type TCacheEntry for use in caching. |
| ILookupKeyCollection<TCacheEntry> | Maintains a list of keys that can be used to look up a single entry within an ICache<TCacheEntry> and their mapping to a unique System.Guid. |
Was this page helpful?Thanks for your feedback!