Squid_ The Definitive Guide - Duane Wessels [181]
Note that the hierarchical flag determines only whether or not Squid queries its neighbor caches. It doesn't determine which requests must, or must not, be sent to parent caches. The always_direct and never_direct access lists have that responsibility.
Syntax
hierarchy_stoplist string ...
Default
hierarchy_stoplist cgi-bin ?
Example
hierarchy_stoplist .cgi
hierarchy_stoplist http://www.mysite.org
Related
always_direct, never_direct
Name
no_cache
Synopsis
no_cache is a sequence of access control rules (see Section 6.2) that specify responses that must not be cached by Squid. Of course, Squid has some hardcoded rules for responses that must not be cached according to the HTTP RFC. The no_cache rules are in addition to those.
The no_cache syntax is a little tricky. You must use deny for rules where the response must not be cached. Consider this example:
acl GoodStuff url_regex /foo/bar/
acl BadStuff url_regex /bar/
no_cache allow GoodStuff
no_cache deny BadStuff
Here, a URL containing /foo/bar/ may be cached, but any other URL containing only /bar/ isn't cached. The meaning of the allow and deny might be the opposite of what you expect. Just remember that deny carries the same negative connotation as "not caching" something.
Syntax
no_cache allow|deny [!]ACLname ...
Default
No default
Example
acl LocalServers dst 192.168.8.0/24
no_cache deny LocalServers
Related
always_direct, never_direct, http_access
Name
cache_access_log
Synopsis
This is the location of Squid's access.log, which contains one entry for each client request. See Section 13.2 for the details. If you want to disable the access log, set this to /dev/null.
Syntax
cache_access_log pathname
Default
cache_access_log $prefix/var/logs/access.log
Example
cache_access_log /var/log/squid-access.log
Related
emulate_httpd_log, cache_log, cache_store_log, log_ip_on_direct, logfile_rotate
Name
cache_log
Synopsis
This log file contains various operational and debugging messages from Squid. See Section 13.1 for more information. If you want to disable cache.log, set this directive to /dev/null.
Syntax
cache_log pathname
Default
cache_log $prefix/var/logs/cache.log
Example
cache_log /var/log/squid.log
Related
debug_options, cache_access_log, cache_store_log, logfile_rotate
Name
cache_store_log
Synopsis
The store.log contains details about Squid's interaction with the disk cache. You'll see entries as objects are stored to disk, read from disk, and removed from the cache. See Section 13.3 for the details. You can disable this log by setting it to none.
Syntax
cache_store_log pathname
Default
cache_store_log $prefix/var/logs/store.log
Example
cache_store_log /var/log/squid-store.log
Related
cache_access_log, cache_log, logfile_rotate
Name
cache_swap_log
Synopsis
Each cache directory has its own swap log file. These are binary-format journal files Squid uses to rebuild the in-memory indexes when in starts up. Each swap log file is located in the corresponding cache directory by default. If you use this option, Squid puts all swap log files in one directory. See Section 13.6 for more information.
Syntax
cache_swap_log pathname
Default
swap.state in each cache_dir
Example
cache_swap_log /var/log/squid-swap-state
Related
cache_store_log, logfile_rotate, cache_dir
Name
emulate_httpd_log
Synopsis
Squid uses its own native format for the access.log by default. If you enable this directive, the access log is written in the HTTPD common log file format. Often useful when Squid is accelerating an origin server site.
Syntax
emulate_httpd_log on|off
Default
emulate_httpd_log off
Example
emulate_httpd_log on
Related
cache_access_log, httpd_accel_host
Name
log_ip_on_direct
Synopsis
By default, Squid puts origin server IP addresses into the ninth field of the access.log. If you enable this directive, Squid puts the origin server