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.
The Vary Cookie header ensures that the browser does not display an old version of a page after login/logout. In order to support caching of authenticated users (as per #1932444: Boost as Authcache Backend), the .htaccess generated by boost_htaccess_cache_dir_generate
should include the directive Header append Vary Cookie
. The attached patch introduces that option.
Comment | File | Size | Author |
---|---|---|---|
boost-add-vary-cookie-directive.patch | 2.32 KB | znerol | |
Comments
Comment #1
jason.fisher CreditAttribution: jason.fisher commentedWith latest dev:
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedI may be being thick here but I wold like to know a scenario where this would be useful. The user logs out, become anonymous, boost works as an anonymous cache. Any scenario where the content is liable to become stale (like a shop and stock levels displayed on a page) or a shop where the buy button submits a form which drupal core would have expired would not be an appropriate boost based site anyway.
Comment #3
electrocret CreditAttribution: electrocret commentedPhilip_Clarke - This patch paired with authcache would allow the static information on a page to be held in files via boost, and dynamic or personalized content would be inserted via AJAX callback on a per user/page basis by authcache. Stale content would not be served assuming the admin configures authcache properly. It Combines the speed of boost, and flexibility of authcache.
Comment #4
jollysolutionsworks well for me please commit to next release
Comment #5
bgm CreditAttribution: bgm commentedIs there a situation where we would not want to include this option by default?
i.e. does it really require a config option? People are probably going to be pretty confused by this option, considering Boost normally only works with anonymous visitors.
Comment #6
jollysolutionsComment #9
ram4nd CreditAttribution: ram4nd as a volunteer commented