Hi,

Our site has an awful lot of roles for authenticated users, but 90% of them are irrelevant in terms of cache keys. I have crafted a small patch to the ESI module that allows the set of roles that are incorporated into the hash to be configurable in the settings. The default is still to include all roles.

For more advanced cases, I've also added drupal_alter() hooks into the role and user hashing functions for other modules to do fancier decisions on which roles matter.

Hope you like it! Wonderful module by the way...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mikeytown2’s picture

Status: Needs review » Fixed
FileSize
2.92 KB

Thanks. This patch has been committed. I've just added more documentation to your patch.
http://drupalcode.org/project/esi.git/commit/33237454ab5f92dfbd840a544cb...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

manarth’s picture

7.x-3.x contains an alternative implementation: you can use hook_esi_context() to introduce a new limited-role context, or hook_esi_context_alter() to change the role context and remove the irrelevant roles.