Find Squid’s Disk Cache Directories in cache_dir
Read the configured disk-store directories instead of assuming every Squid installation caches under /var/spool/squid.
For Squid versions using cache_dir, inspect that directive in the configuration actually loaded by the service. The directory is an argument, not a universal installation path:
cache_dir ufs /var/spool/squid 100 16 256
In this example, /var/spool/squid is the top-level disk-cache directory. The following numbers describe this UFS store’s capacity and subdirectory layout. They are not parts of the pathname.
Check the service’s selected configuration file and its included files. A commented example does not enable a disk store, and multiple active cache_dir entries can place storage in several directories.
There may be no disk cache to find. Squid 7’s documented default stores cache objects only in memory when no disk cache is configured. Distribution configuration can choose a disk store explicitly. This interface is documented through Squid 7 and is absent from Squid 8, so identify the installed version before applying its configuration syntax.