Varnish cache is missed after some time

186 Views Asked by At

Varnish cache is missed after some time even though the Page cache maximum age in "GENERAL SETTINGS" of Advanced Varnish configuration is set to "1 month"

While overriding the TTL value from individual content type still it doesn't work.

1

There are 1 best solutions below

1
Thijs Feryn On

There are many factors to affect the hit rate of your Varnish server.

Please share the following information:

  • The Cache-Control headers that your application sends
  • The VCL code
  • Your varnishd runtime parameters and specifically the value of the -s parameter
  • The output of varnishstat -f MAIN.n_lru_nuked -f MAIN.n_object -f SMA.*.g_bytes -f SMA.*.g_space

If there are specific transactions that result in a cache miss but that are supposed to be hits, please run send the output of the following command:

varnishlog -g request -q "ReqUrl eq '/'"

FYI: This varnishlog command filters transactions for the / homepage. If the problem occurs on another page, please adjust the -q filter.

Based on all this information I can check where the problem is situated.