Skip to content

Ability to have several context hashes #479

@andrerom

Description

@andrerom

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions