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 authcache key for anonymous users set in settings.php, works fine with Redis. Want to move to varnish now, just anony users.
But not sure how this will work. Currently I am setting key per country IP. So in settings.php we add
// Set default variant.
$variant = ':ip-' . strtolower($country);
return $base_root . $variant;
wondering how will this work with varnish. Will we need to somehow set variant url retreived in varnish.vcl to match the one set in authcache key function? Wondering how key setting works with varnish and authcache.
Comments
Comment #2
Marko B CreditAttribution: Marko B commentedSolution in the end is based on using geoip in varnish, setting hash with that data and then passing this geoip through headers to authcache which then can create key as usual.
Comment #3
Marko B CreditAttribution: Marko B commented