public DistributedCachableFactory(IDistributedCache cache, IEntrySerializer serializer, CachableOptions <DistributedCacheEntryOptions> options) { _cache = cache; _serializer = serializer; _options = options; }
public static void AddDistributedCachable(this IServiceCollection services, Action <CachableOptions <DistributedCacheEntryOptions> > optionsConfigurator = null) { services.AddScoped <ICachableFactory, DistributedCachableFactory>(); var options = new CachableOptions <DistributedCacheEntryOptions>(); optionsConfigurator?.Invoke(options); services.AddSingleton(options); }
public MemoryCachableFactory(IMemoryCache cache, CachableOptions <MemoryCacheEntryOptions> options) { _cache = cache; _options = options; }