NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
NuGet · #854 most downloaded on NuGet
Lazy cache is a simple, thread safe, in-memory caching library that makes it easy to add high performance caching to your dotnet app.
Last release 5 years ago
no release in 18 months
Ships fairly regularly
a new release about every 7 months
Most releases are documented
notes for 11 of 18 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
21 releases · first in 2014
Bug fix for generic type - see #163. Thanks @gamblen
Rename ExpirationMode.ImmediateExpiry => ExpirationMode.ImmediateEviction
One column per quarter.
Tweak key lock array size based on CPU count so larger for bigger machines (See PR #126 and discussion with @jjxtra)
PR #126 (and issue #104) optimise cache key locking for faster performance under high CPU load and lots of concurrency. Thanks to @jjxtra
ExpirationMode.ImmediateExpiration which uses a timer to remove items from the cache as soon as they expire (more resource intensive)
Fix #85 and #100 Absolute expiration not working with TimeSpan. Thank you to @Meberem and @Sinhk.
Fix #82 Make constructor resolution specific when using aspnet core dependency injection
Fix #46 GetOrAdd and GetOrAddAsync returning nulll if there is already an item with the same key but different type in the cache (PR #106)
Also available from https://www.nuget.org/packages/lazycache
Also available from https://www.nuget.org/packages/lazycache
Also available from https://www.nuget.org/packages/lazycache
Also available from https://www.nuget.org/packages/lazycache
*BREAKING CHANGE* Upgrade to netstandard2.0
BREAKING CHANGE Upgrade to netstandard2.0
BREAKING CHANGE Change underlying cache from System.Runtime.Caching to Microsft.Extension.Caching.Memory
BREAKING CHANGE Removed IAppCache.ObjectCache and changed to a cache provider model.
To access the provider use IAppCache.CacheProvider. By default we use a singleton shared in-memory cache but add your own cache provider by implmenting the simple ICacheProvider.
BREAKING CHANGE changed from CacheItemPolicy to MemoryCacheEntryOptions. RemovedCallback is now PostEvictionCallbacks.
Added a new replaceable global static default cache provider
Func<ICacheProvider> DefaultCacheProvider { get; }
By default we use a shared in-memory cache but each instance can have it's underlying cache provider overridden from it's constructor.
Make methods on CachingService virtual/protected to enable
Add LazyCache.AspNetCore for dependency injection registration - ServiceCollection.AddLazyCache();
Update sample to use aspnet core and LazyCache.AspNetCore
New IAppCache.DefaultCachePolicy to replace CachingService.DefaultCacheDuration
Moved most CachingService method overloads to extension methods on IAppCache in AppCacheExtensions. API should be backwards compatible but as now extension methods this is technically an API breaking changing.
Added new methods on IAppCache to allow you to specify cache expiry options on executution of the item factory
GetOrAdd<T>(string key, Func<ICacheEntry, T> addItemFactory)
Task<T> GetOrAddAsync<T>(string key, Func<ICacheEntry, Task<T>> addItemFactory)
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →