You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description
Sometimes we need to share the cache pools among application written in different languages, in my case I cache the redirection rules to Redis, and have my lua script loads them inside nginx to do instant redirection without having to send the request to PHP. Having the cached content serialized by PHP creates lots of unnecessary headaches. Obviously I can skip the whole cache contract by Symfony and save the redirection rules to Redis directly via my custom PHP code, but I would rather not do that if I can.
Right now I cannot see a way to skip serializer (marshaller) or perhaps providing custom serializer per cache pool at all.
The text was updated successfully, but these errors were encountered:
yellow1912
changed the title
Allow skipping serializer for a specific cache pool
[Cache] Allow skipping serializer for a specific cache pool
Dec 7, 2020
Closing as you found the way to do it. This is not common enough to me and we shouldn't add config for that.
Thanks for proposing and for posting your solution.
Uh oh!
There was an error while loading. Please reload this page.
Description
Sometimes we need to share the cache pools among application written in different languages, in my case I cache the redirection rules to Redis, and have my lua script loads them inside nginx to do instant redirection without having to send the request to PHP. Having the cached content serialized by PHP creates lots of unnecessary headaches. Obviously I can skip the whole cache contract by Symfony and save the redirection rules to Redis directly via my custom PHP code, but I would rather not do that if I can.
Right now I cannot see a way to skip serializer (marshaller) or perhaps providing custom serializer per cache pool at all.
Example
I think it can be as simple as:
or
(I saw this PR: #27484 which is not approved. I think my use case is a bit different however).
Edit 1:
I got around this by defining my own redis adapter and marshaller:
The text was updated successfully, but these errors were encountered: