Difference between Eviction, Expire and Remove events #428
-
|
I read the events document, but am unsure of the difference between:
How do they differ? (I'm using the memory option only.) |
Beta Was this translation helpful? Give feedback.
Answered by
jodydonetti
Mar 17, 2025
Replies: 1 comment 5 replies
-
|
After rereading https://github.com/ZiggyCreatures/FusionCache/blob/main/docs/CoreMethods.md, I think:
Is my understanding correct? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, basically "eviction" is in general what happens when an entry in the cache "goes away".
Remove does remove an entry from the cache, for good (there's no going back).
Expire instead means "remove the entry if fail-safe is off for that entry, otherwise mark it as expired but keep it around in case it's needed as a fallback" (see fail-safe for more).
Hope this helps.