Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am using https://www.drupal.org/project/masquerade on a rather prominent place and I've found that the switch that allows admins to switch back from the user they masquerade as is getting cached.
Obviously, I could put that widget on some page that's only accessible to admins, but then it's less usable for those.
So I would like to avoid caching for people who are masquerading. Any pointers to which hook I should use?
Comments
Comment #1
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedTurns out this is easy to do:
in
Comment #2
mr.baileysIf you want to avoid caching while masquerading, I think using hook_authcache_account_exclude() might be better:
Comment #3
znerol CreditAttribution: znerol commentedThanks @mr.baileys for answering this request. Please open a new issue if there is still something unclear.