Pages

How to Configure Squid Cache Directive

• The cache dir directive(s) tell Squid how and where to store cached objects.

• Syntax:
cache_dir type path megabytes L1 L2

type location size L1 L2
cache_dir ufs /var/spool/squid 50000 16 256


• The default type is ufs, but aufs has better performance on
Linux. diskd is good too.

• path can be anywhere on the ¯lesystem, but is usually a
dedicated disk or partition.

• megabytes is an upper limit on how much space Squid should
use for this cache dir . It should be less than 90% of the
actual capacity.

• L1 and L2 specify the number of ¯rst- and second-level di-
rectories to use. Use 16 and 256 by default. These should
not be changed after Squid has placed objects on the disk.

Forex Trading