Squid_ The Definitive Guide - Duane Wessels [182]
Syntax
log_ip_on_direct on|off
Default
log_ip_on_direct on
Example
log_ip_on_direct off
Related
cache_access_log
Name
cache_dir
Synopsis
This directive instructs Squid where, and how, to store cached objects on disk. See Section 7.1 for the details on cache directories.
The second parameter selects the storage scheme. Your choices are ufs, aufs, diskd, coss, and null. To use any scheme other than ufs, you must use the --enable-storeio option with ./configure. See Section 3.4.
The third parameter is the amount of disk space to use for the cache. The units are in megabytes.
The fourth and fifth parameters are the number of L1 and L2 directories. Don't change these values for directories that already contain cached objects.
Some cache_dir schemes have additional, optional parameters. Refer to the scheme-specific sections in Chapter 8.
Syntax
cache_dir scheme
directory
size-MB
L1
L2 [options...]
Default
cache_dir ufs $prefix/var/cache 100 16 256
Example
cache_dir ufs /cache0 3072 16 128
Related
cache_replacement_policy, cache_mem
Name
cache_mem
Synopsis
Squid uses memory to store recently received objects and to buffer active responses. This directive specifies the amount of memory to use for storing these objects.
* * *
Tip
This directive doesn't entirely control the size of the Squid process. See Appendix B for additional information.
* * *
Syntax
cache_mem bytes-specification
Default
cache_mem 8 MB
Example
cache_mem 16 MB
Related
cache_dir, maximum_object_size_in_memory, memory_replacement_policy
Name
cache_swap_low
Synopsis
This directive, along with cache_swap_high controls the replacement of objects stored on disk. It is a percentage of the maximum cache size, which comes from the sum of all cache_dir sizes. See Section 7.2 for additional information.
Syntax
cache_swap_low percent
Default
cache_swap_low 90
Example
cache_swap_low 85
Related
cache_swap_high, cache_dir
Name
cache_swap_high
Synopsis
See the description for cache_swap_low. Note that changing cache_swap_high probably won't have a big impact on Squid's disk usage. See Section 7.2 for additional information.
Syntax
cache_swap_high percent
Default
cache_swap_high 95
Example
cache_swap_high 99
Related
cache_swap_low, cache_dir
Name
maximum_object_size
Synopsis
This directive places a limit on the largest object that Squid can store on disk. Responses larger than this size aren't cached. See Section 7.3 for additional information.
Syntax
maximum_object_size bytes-specification
Default
maximum_object_size 4096 MB
Example
maximum_object_size 250 MB
Related
minimum_object_size, maximum_object_size_in_memory, reply_body_max_size
Name
minimum_object_size
Synopsis
With this directive, you can also place lower limits on the size of cached objects. Responses smaller than this size aren't stored on disk or in memory. See Section 7.3 for additional information.
Syntax
minimum_object_size bytes-specification
Default
minimum_object_size 0 bytes
Example
minimum_object_size 300 bytes
Related
maximum_object_size
Name
maximum_object_size_in_memory
Synopsis
This directive allows you to control the size of objects stored in memory. Objects that are larger than this value aren't kept in memory. See Section 7.3 for additional information.
Syntax
maximum_object_size_in_memory bytes-specification
Default
maximum_object_size_in_memory 8 KB
Example
maximum_object_size_in_memory 12 KB
Related
cache_mem, maximum_object_size
Name
cache_replacement_policy
Synopsis
This directive controls the replacement policy for Squid's disk cache. Version 2.5 offers three different replacement policies: least recently used (LRU), greedy dual-size frequency (GDSF), and least frequently used with dynamic aging (LFUDA). Note that the keywords (lru, GDSF, etc.) are case-sensitive! See Section 7.5 for additional information.
Syntax
cache_replacement_policy lru