Compressed encapsulated memory cache based on BarbezDotEu.Extensions.Caching and MessagePack.
This library provides a compressed memory caching implementation that uses MessagePack serialization for efficient storage. It extends the functionality of BarbezDotEu.Extensions.Caching by adding compression capabilities.
- Implements
IEncapsulatedMemoryCacheinterface - Uses MessagePack serialization with LZ4 block array compression
- Built for .NET Standard 2.0
- MIT Licensed
- BarbezDotEu.Extensions.Caching (>= 3.0.1)
- MessagePack (>= 3.1.3)
Install via NuGet:
The CompressedMemoryCache class provides a memory cache implementation that automatically compresses cached objects using MessagePack serialization.
The CompressedMemoryCache class implements IEncapsulatedMemoryCache and provides compressed object caching using MessagePack serialization with LZ4 block array compression.
memoryCache: An instance ofIMemoryCachethat will be used for the underlying storage.
Retrieves and decompresses an object from the cache:
method: The method name associated with the cache entrydifferentiator: The differentiator used when the object was cached- Returns: The cached object of type
TReturn, ornullif not found
Copyright © 2025 Hannes Barbez. All rights reserved.
Licensed under the MIT License.