Cache provider for NHibernate using .Net Core IDistributedCache (Microsoft.Extensions.Caching.Abstractions).
This provider is not bound to a specific implementation and require a cache factory yielding IDistributedCache implementations.
NHibernate is able to use external caching plugins to minimize the access to the database and improve the performance.
The NHibernate Contrib contains several packages to work with different caching servers and frameworks.
It's recommended to research for a while before deciding which one is better for you, since some providers require installing additional services
(which provides an awesome performance, but might be harder to install in some scenarios).
Notes
Build 5.9.0 for NHibernate 5.2.0
Possible breaking change
To eliminate the need for a JSON serializer custom registration, CoreDistributedCache now uses a simple object[]
as the cached value instead of a Tuple<string, object>(keyAsString, value):
Upon upgrade, all previously cached entries will be ignored.
If the distributed cache remains filled by older releases through other processes, there will be additional cache
misses for both older and newer versions.
If you are using another serializer than the default binary serializer, you may have to adjust its configuration.
Improvement
#117 - Avoid custom registration for the Json serializer
CoreDistributedCache now uses a Tuple<string, object>(keyAsString, value) as the cached value instead of a
Tuple<object, object>(key, value):
Upon upgrade, all previously cached entries will be ignored.
If the distributed cache remains filled by older releases through other processes, there will be additional cache
misses for both older and newer versions.
If you are using another serializer than the default binary serializer, you may have to adjust its configuration.
Distinguishing different objects which keys have the same string representation and hashcode is no more supported.
NHibernate.Caches.Util.JsonSerializer now uses Newtonsoft.Json 13.0.1, up from 10.0.1.
Improvement
#106 - Unable to use DistributedCache with JsonCacheSerializer
Task
#112 - Release 5.8.0
#110 - Update Newtonsoft Json.Net to a non-vulnerable version
#109 - Automatically generate async code on pull request
#108 - Fix AppVeyor build
#89 - Fix iconUrl warning
Build 5.7.0 for NHibernate 5.2.0
New feature
#83 - Add support for custom serializer in CoreDistributedCache
#79 - Allow replacing ConfigurationManager for reading values
Task
#88 - Release 5.7.0
#86 - Update SourceLink package to its release version
#85 - Remove NuGet download
#74 - Fix nuget source for pushing snupkg
Build 5.6.0 for NHibernate 5.2.0
Possible breaking change
The obsolete Microsoft.Extensions.Caching.Redis dependency has been changed for
Microsoft.Extensions.Caching.StackExchangeRedis, in NHibernate.Caches.CoreDistributedCache.Redis
Bug
#66 - Issues with custom Regions with RedisCacheProvider
#62 - StackExchangeRedis fails with "too many results to unpack" with 8000 items
New feature
#69 - "Third Level Cache" for Redis
Improvement
#71 - Enable batching for StackExchangeRedis by default
#70 - Use non deprecated Redis provider
#68 - Add static region configuration
#64 - Improve StackExchangeRedis LockMany script for DefaultRegionStrategy
#60 - Update package format for symbols, license and SourceLink
Task
#65 - Update AsyncGenerator to 0.14.0
Build 5.5.1 for NHibernate 5.2.0
Re-release in order to have proper release notes in the NuGet packages.
Build 5.5.0 for NHibernate 5.2.0
NHibernate 5.2.0 is targeted by all cache providers.
Bug
#53 - Disable append-hashcode when library is not built for netFx
#32 - Key computing for Memcached leaks hashers
New feature
#50 - Common cache serializer and json serializer
#45 - Add Redis provider with batching support
Improvement
#52 - Cease using cryptographic hashes
Task
#56 - Upgrade to NH 5.2.0
Build 5.4.0 for NHibernate 5.1.0
NHibernate 5.1.0 is targeted by all cache providers.
Bug
#48 - Avoid undue cache misses
New feature
#47 - Add an option for appending hashcode to key
#38 - Add a Core RtMemoryCache
Improvement
#36 - Push symbols packages
Task
#46 - Update NHibernate to 5.1.0
Build 5.3.2 for NHibernate 5.0.0/5.1.0
Bug
#40 NullReferenceException in SysCache2's SysCacheProvider