To use the disk cache instead of the memory cache, edit the Varnish command line and locate the -s
argument and change it from:
-s malloc,256m
which uses memory storage of 256MiB, to:
-s file,/var/cache/varnish/varnish_storage.bin,10G
where:
/var/cache/varnish
is a directory where the varnish_storage.bin
file will be placed.10G
means 10GiB of storage.