So far we have learned the meaning of different parameters used with the cache_dir
directive. Let's see an example of the cache directory /squid_cache/
with 50GB of free space:
cache_dir aufs /squid_cache/ 51200 32 512
We have a cache directory /squid_cache/
with 50 GB of free space with the values of L1
and L2
as 32 and 512 respectively. So, if we assume the average size of a cached object to be 16 KB, there will be 51200x1024÷(32x512x16) = 200 cached objects in each of the directories at the second level, which is quite good.
We added /squid_cache/
with a 50 GB free disk space as a cache directory to cache web documents on the hard disk. Following the previous instructions, we can add as many cache directories as we want, depending on the availability of space.