Closed sudo-ds closed 8 months ago
Hi @sudo-ds and thanks for using FusionCache!
I'm trying to better understand your scenario, so let's make an example: you want to cache in memory for 10sec
, in distributed for 10min
, but also want to eager refresh at, say, 8min
(80% of distributed duration)?
Is this it?
Hi @sudo-ds and thanks for using FusionCache!
I'm trying to better understand your scenario, so let's make an example: you want to cache in memory for
10sec
, in distributed for10min
, but also want to eager refresh at, say,8min
(80% of distributed duration)?Is this it?
Yes exactly.
In this specific case what I would suggest is to set the DistributedCacheDuration
to the early value (8min
in the previous example) and enable fail-safe + soft timeout: in this way the refresh will happen earlier, and you'll be protected from both transient failures during refresh, and also slow refresh, basically getting the same result.
Hope this helps.
Hi @sudo-ds , did it work?
Hi @sudo-ds , any news about this? I'm closing this for now but let me know and I'll reopen it.
Problem
I wanted to use a combination of an eager refresh with a duration of distributed cache layer (
DistributedCacheDuration
). If I'm correct by default eager refresh works withDuration
of first in memory cache layer and most of the users are using the same duration for both layers. I wanted to use different durations for each layer + eager refresh for the duration of the second layer.Motivation
The reason for combining different durations for each layer + eager refresh is mostly meant to be as workaround in situations like some node will update distributed cache and we don't have a backplane.