I understand that the session cache is using the registered ICacheClient automatically.
But is it possible that I only use the registered OrmLiteCacheClient for the auth sessions and not for the regular caching I want to do (I want it to be in memory).
So basically, can I choose which provider to use for Auth caching and for regular caching of things?
The Session always uses the registered ICacheClient
but you can a Local In MemoryCache Client with the base.LocalCache
dependency, e.g:
return Request.ToOptimizedResultUsingCache(LocalCache, cacheKey, expireCacheIn,
() => {
//Delegate executed only if item does not already exist in cache
//Any response DTO returned is cached on subsequent requests
});
Which is also available with the [CacheResponse] attribute:
[CacheResponse(Duration = 60, LocalCache = true)]
But there is no option to use a different cache except for the Local InMemory Cache.