Oscar Rylin wrote:
>Recently, one of our accelerated machines started throwing out errors, and
>it got me thinking.
>Would it be possible to have Squid not cache objects based on a status code
>(for instance 500/Internal server error, 403 forbidden etc)?
>
>This would be something along the lines of content-inspection, so a quick
>take of the flow that would happen would be:
>1: Client connects to Squid and requests www.normally.cacheable/object
>2: Squid notices that the object is stale and attempts to retrieve a fresh
>copy from the origin server
>3: Origin server returns Status: 500 in the headers, and Squid defaults to
>serving up the stale object instead of the fresh (but broken) object
>
>Any ideas, finger-pointing or such would be greatly appreciated
>
Hello Oscar Rylin,
We guess it might be Time-to-Live (TTL) for failed requests. Certain
types of failures (such as "connection refused"
and "404 Not Found") are negatively-cached for a configurable amount of
time. The default is 5 minutes. Note that
this is different from negative caching of DNS lookups.
Check with negative_ttl directive in squid.conf file.
-- Thanks, Visolve Squid Team, http://squid.visolve.comReceived on Sun Aug 06 2006 - 21:17:36 MDT
This archive was generated by hypermail pre-2.1.9 : Fri Sep 01 2006 - 12:00:01 MDT