-
Notifications
You must be signed in to change notification settings - Fork 62
Description
Recent use case popped up that we have been thinking about some years now is to add support for several context hashes. In order to allow our end users to deal with personalized responses when there is a use case to still allow it to be cached.
Context
We use X-User-Context-Hash
for user permissions, and if some of our end users extend that to add additional things to the hash, lets say profile choices or other personalized user info you'll end up with:
- A lot of cache variants for ALL responses, consuming lots of additional memory
- Very low cache hit ratio
Solution
Support for several kind of hashes, each with own Vary header, so only responses that truly need to vary on e.g. X-User-Profile-Hash
will actually do so (typically in addition to varying X-User-Context-Hash
).
VCL would probably need to be adapted for this, unless we have a convention we can match in VCL and in PHP (SymfonyCache).