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.


no_cache allow|deny [!]ACLname ...


No default


acl LocalServers dst

no_cache deny LocalServers


always_direct, never_direct, http_access

    Appendix A. Config File Reference