Replies: 3 comments 1 reply
-
Hi @mrxrsd , nothing so far, nobody asked for this as of today, but I can see if something can be done.
Is there some code that should've been posted as an example? Questions: are you interested in L1 only or L1+L2? Thanks |
Beta Was this translation helpful? Give feedback.
-
Hi Jody, Sorry if I wasn't clear, I didn't intend to send any code. I meant that I implemented it here in my project using the decorator pattern, but I was wondering if there was a more 'native' way to do it instead of using a pattern. By the way, I saw this other thread, which in the end was something similar to what I did here, but here I created a singleton decorator that does a toLower on the keys before calling the fusion cache. My case is simpler because I don't rely much on the context. If I had a key transformer Func<original_key, transformed_key>, it would solve the problem.
I was thinking, a solution to unify it could be for the 'WithCachePrefix' to internally create a function (key) => _prefix + key; Regarding your question, it would be for L1 and L2, yes. In my case, they were using a legacy cache where the keys are case-insensitive. Since I'm refactoring using the fusion cache, I thought it was more prudent to maintain the same behavior. However, this approach would only solve my problem. For the multitenant case, the transformer function would need to have some extra context, maybe something even via DI. |
Beta Was this translation helpful? Give feedback.
-
As additional input into this discussion, I've been working on a backplane using NATS and it does pose some problems since there are some characters like So to make that work we either need a way to configure/override these special values and separators or something like the transformer function mentioned above. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is there any option to make cache keys case-insensitive? I did it here using a decorator, but I was wondering if there is a better way to go, if there is any interceptor, or if I can do it through a plugin?
tks
Beta Was this translation helpful? Give feedback.
All reactions