A generic implementation for caching that supports application-, request- and session-caching...
This implementation requires
Autofac
since this is the Inversion of Control container of our choosing.
builder.RegisterCacheProviders();
var builder = new ContainerBuilder();
builder.RegisterCacheProviders();
var container = builder.Build();
Store
: Memory (MemoryCache)
Stores application-specific data, e.g application configuration that only change between deployments/releases.
Store
: Dictionary (ConcurrentDictionary)
Stores request-specific data, e.g. data used for a specific page that is fetched multiple times.