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.
Problem/Motivation
By default authcache key retrieval is skipped for anonymous users without a session. As a result, Varnish will not advertise to the backend that it is willing to replace ESI tags (i.e. does not add X-Authcache-Do-ESI
to the request headers sent to the be) and that will disable Authcache ESI.
It is possible to work around this issue by uncommenting Example 4: Trigger key-retrieval for all users, including anonymous. in the vcl_recv
section of the example.vcl
.
Proposed resolution
Find a better way.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#3 | no_esi_performed_for-2427465-3.patch | 529 bytes | znerol |
#1 | no_esi_performed_for-2427465-1.patch | 529 bytes | znerol |
Comments
Comment #1
znerol CreditAttribution: znerol commentedComment #2
znerol CreditAttribution: znerol commentedCosmetics: unset all response headers in the same spot.
Comment #3
znerol CreditAttribution: znerol commented#2 contains the wrong patch. Reuploading #1
Comment #5
znerol CreditAttribution: znerol commentedTurns out this is not a problem with the VCL, but merely a documentation issue. we need to retrieve an authcache key if we want to do fragment replacement for anonymous users - there is no way around that. The committed fix is still useful because it does not make any sense to check whether
req.http.X-Authcache-Get-Key
is present or not - it is always there.Comment #8
znerol CreditAttribution: znerol commented