Branch | Status |
---|---|
master | |
develop |
Package Name | FullFramework | .NET Standard |
---|---|---|
4.0/4.5 | 2.0 |
This library has implemented CacheManager.Core's BaseCacheHandle<T> using FileCache as our persistent store. Cache Manager 2.0.0-prerelease must be used in order to support NetStandard.
I assume you are already familiar with CacheManager, so really the only thing you need to get going is configure.
var config = new ConfigurationBuilder()
.WithJsonSerializer() // Only need this line if targeting netstandard
.WithFileCacheHandle()
.Build();
var _cache = new BaseCacheManager<string>(config);
// Then somewhere else in your code
_cache.Add("mykey","myvalue");
var result = _cache.Get<string>("mykey");
Note: NetStandard target of CacheManager doesn't support BinarySerializer right now
Please look in the unit tests for other examples of caching Complex Objects.