Squid does not keep every object it has ever cached. Its disk store has a configured capacity and a replacement policy for choosing which cached objects to remove.

In the Squid 7 interface, the ordinary LRU policy and default disk watermarks are expressed as:

cache_replacement_policy lru
cache_swap_low 90
cache_swap_high 95

The watermarks are percentages of configured swap space. Replacement begins when usage is above the low watermark. As usage approaches the high watermark, eviction becomes more aggressive, aiming to keep the cache near the low mark.

LRU chooses objects according to recent use. The capacity is established by the disk-store configuration, including the relevant cache_dir entries; changing a watermark does not create additional disk space.

That is the normal cache lifecycle: an object can be removed and fetched again when later requested. There is no need to delete the whole cache simply because it has accumulated many files.

Continue to monitor the filesystem itself. Logs, metadata, temporary files and other programs can occupy space outside the cached-object capacity. Cache replacement manages Squid's store, not every file sharing the disk.

Artihkkalat mat laktásit