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

Marko B created an issue. See original summary.

Marko B’s picture

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

Marko B’s picture

Status: Active » Closed (works as designed)