How to force refresh? #296
Closed
angularsen
started this conversation in
General
Replies: 2 comments 6 replies
-
Hi @angularsen
I'm not sure I'm understanding this, can you be more explicit? Anyway, in general:
Keep in mind that, if you enabled fail-safe and/or soft/hard timeouts, in case of problems the stale data may be used, but that's the whole purpose of those features, and you have to opt-in to them. |
Beta Was this translation helpful? Give feedback.
6 replies
-
I'll close this as solved, I have something that works for me. To "force refresh" cache in a system with multiple instances of the same app/service:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Could not find any best practices on this, so what is a good way to attempt a force refresh of the cache?
A few ideas:
Remove()
thenGetOrSet()
will remove from both memory and distributed cache, but I only want to update value if successful not remove anythingExpire()
thenGetOrSet()
will remove from distributed cache even if not expired, same reason (docs sayIn the distributed cache (if any), the entry will be effectively removed.
)Expire()
withSkipDistributedCache=true
, thenGetOrSet()
, may work if it indeed skips updating distributed cacheGetOrSet()
withSkipMemoryCache=true
andSkipDistributedCache=true
, I assume this will not update cache with fresh new value?Beta Was this translation helpful? Give feedback.
All reactions