Replies: 2 comments
-
At the moment we have a quite naive cache implementation, we completely serialize the PHP settings class into a cache entry. I think we can extend this by allowing overwriting the cache key. Then you could save and load serialized objects for each user using a different cache key which would solve the problem. I would be open for such a PR, the problem is that defining closures inside a config file is not allowed. Which would require an interface and classes implementing it and this feels quite heavy. Maybe a method on the settings class could define the cache key? Then you could overwrite it where necessary. |
Beta Was this translation helpful? Give feedback.
-
is there any solution for this ? |
Beta Was this translation helpful? Give feedback.
-
First of all thank you for creating this fantastic package.
I have a use case where settings change based on the current logged in user (like user settings), which is done by dynamically building the group of a settings class. However, this only works when the cache is disabled. As far as I understood, the reason is that caching works per settings class, no matter what the group is.
Would it be possible to have different versions of a settings class cached based on its group?
Beta Was this translation helpful? Give feedback.
All reactions