You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then I add the initial catalog to the redis HybridCache cache using:
cache.GetOrCreateAsync<List<Tenant>>(TenantsCacheKey,
_ =>ValueTask.FromResult(newList<Tenant>{// ... initial list of test data here}))
If I peek into my Redis cache, it looks all good, I can see my list of test data tenants, except the TTL of the cache entry is only 4 minutes? How do I insert a cache entry so there is no TTL. I have tried adding a HybridCacheEntryOptions with Expiration set to NULL to the GetOrCreateAsync call, but this results in a TTL of 2 minutes.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm looking at using a Hybrid Cache backed by a Redis database to use as a source for tenant catalog. My service registration looks like this:
Then I add the initial catalog to the redis HybridCache cache using:
If I peek into my Redis cache, it looks all good, I can see my list of test data tenants, except the TTL of the cache entry is only 4 minutes? How do I insert a cache entry so there is no TTL. I have tried adding a
HybridCacheEntryOptions
withExpiration
set toNULL
to theGetOrCreateAsync
call, but this results in a TTL of 2 minutes.Beta Was this translation helpful? Give feedback.
All reactions