ZiggyCreatures / FusionCache

FusionCache is an easy to use, fast and robust hybrid cache with advanced resiliency features.
MIT License
1.92k stars 97 forks source link

Cache keys prefix #80

Closed sigurdhj closed 2 years ago

sigurdhj commented 2 years ago

Hi.

I've noticed that all my keys are getting prefixed with v1. Why is this happening? Is it possible to remove the v1 prefix?

jodydonetti commented 2 years ago

Hi @sigurdhj and thanks for using FusionCache.

I suppose you are talking about the distributed cache, right? If that is the case that was done to be future proof for an eventual evolution of the distributed cache format.

Having said that you can configure the way cache keys are modified (or not) with the FusionCacheOptions.DistributedCacheKeyModifierMode option, where you can specify if you prefer Prefix (the default), Suffix or None, so setting it to None will not touch the cache keys at all.

Hope this helps.

sigurdhj commented 2 years ago

Thanks, that worked!