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 [!] |
Default | No default |
Example | acl LocalServers dst 192.168.8.0/24 no_cache deny LocalServers |
Related | always_direct, never_direct, http_access |
Get Squid: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.