Re: [squid-users] negative_t​tl not work at squid 3.1.14 ?

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 22 Jul 2011 00:01:38 +1200

On 21/07/11 22:51, Gao Max wrote:
> hi,all
>
> I just install squid 3.1.14 on centos 5 , and it work at http
> accel mode, it can cache the reponse with right expires and age
> header.
>
> but i found it can't cache the 404 status response (no any expires
> or age header), even i use the negative_ttl setting and delete all
> refresh_pattern.
> <snip>
> 2011/07/21 16:40:56.668| ctx: enter level 0: 'xxxxxxxxx'
> 2011/07/21 16:40:56.668| haveParsedReplyHeaders: HTTP CODE: 404
> 2011/07/21 16:40:56.668| httpMaybeRemovePublic: HTTP CODE: 404
> 2011/07/21 16:40:56.668| storeGet: looking up 7422A1837529156D1D98B1B10AB87DE2
> 2011/07/21 16:40:56.668| storeGet: looking up 90A4D13F2204DBA06956DBCBB39C00E5
> 2011/07/21 16:40:56.668| negativeCache: expires:-1
> 2011/07/21 16:40:56.668| StoreEntry::hashInsert: Inserting Entry
> 0x9ff9cd8 key '7422A1837529156D1D98B1B10AB87DE2'
> 2011/07/21 16:40:56.668| ctx: exit level 0
>
>
> second request ( found one cache but not valid... )
>
> 2011/07/21 16:40:58.162| ClientHttpRequest::httpStart: NONE for 'xxxxxxxxx'
> 2011/07/21 16:40:58.162| clientStreamRead: Calling 1 with cbdata
> 0x9ff4c7c from node 0x9ff21e0
> 2011/07/21 16:40:58.162| storeGet: looking up 7422A1837529156D1D98B1B10AB87DE2
> 2011/07/21 16:40:58.162| validToSend: ENTRY_NEGCACHED: expires:-1
> squid_curtime:1311237658

Looks like the entry _was_ cached. But at the time of possible re-use
was decided against due to the prior caching failing to set the expiry
to the receiving time + negative_ttl.
  I think the (expires==0) in negativeCache() should be (expires<=0)

For my interest, What are the HTTP headers for that 404 message?

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.14
   Beta testers wanted for 3.2.0.9
Received on Thu Jul 21 2011 - 12:01:48 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 21 2011 - 12:00:07 MDT