Tag Name cache_dir
Usage cache_dir Type Maxobjsize Directory-Name Mbytes Level-1 Level2 [..]
DISKD :
cache_dir diskd Maxobjsize Directory-Name MB L1 L2 Q1 Q2

Description

Type specifies the kind of storage system to use. Most everyone will want to use “ufs” as the type. If you are using Async I/O (–enable async-io) on Linux or Solaris, then you may want to try “aufs” as the type. Async IO support may be buggy, however, so beware.

Maxobjsize refers to the max object size this storedir supports. It is used to initially choose the storedir to dump the object. -1 means ‘any size’.

‘Directory’ is a top-level directory where cache swap files will be stored. If you want to use an entire disk for caching, then this can be the mount-point directory. The directory must exist and be writable by the Squid process. Squid will NOT create any directory.

‘Mbytes’ is the amount of disk space (MB) to use under this directory.

‘Level-1′ is the number of first-level subdirectories, which will be created under the ‘Directory’.

‘Level-2′ is the number of second-level subdirectories, which will be created under each first-level directory. To create swap directory use /usr/local/squid/bin/squid –z option.

For the diskd type, Q1 specifies the number of unacknowledged I/O requests when Squid stops opening new files. If this many messages are in the queues, Squid won’t open new files. Q2 specifies the number of unacknowledged messages when Squid starts blocking. If this many messages are in the queues, Squid blocks until it receives some replies.

Default cache_dir ufs /usr/local/squid/cache 100 16 256

Example
cache_dir ufs /cache1 5000 16 256
cache_dir ufs /cache2 7000 16 256

Note
Can specify multiple cache_dir lines to spread the cache among different disk partitions.