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.

CommentFileSizeAuthor
boost-add-vary-cookie-directive.patch2.32 KBznerol
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jason.fisher’s picture

With latest dev:

patching file boost.admin.htaccess.inc
patching file boost.module
Hunk #2 succeeded at 1525 (offset 7 lines).
Anonymous’s picture

Issue summary: View changes
Status: Needs review » Postponed (maintainer needs more info)

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

electrocret’s picture

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

jollysolutions’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

works well for me please commit to next release

bgm’s picture

Status: Reviewed & tested by the community » Needs review

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

jollysolutions’s picture

Status: Needs review » Reviewed & tested by the community

  • ram4nd committed 3d018d4 on 7.x-1.x authored by znerol
    Issue #1942848 by znerol: Introduce optional Vary Cookie header in...

ram4nd credited znerol.

ram4nd’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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