Re: [squid-users] Caching an application/json file

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Fri, 10 Sep 2010 22:58:34 +1200

On 10/09/10 21:44, DjinnS wrote:
> Bonjour,
>
> I have a problem with a json file. It isn't cached by Squid.
>
> Here is the headers send by Apache. A added additionnal expire
> configuration for caching
>
> HTTP/1.0 200 OK
> Date: Thu, 09 Sep 2010 16:40:27 GMT
> Server: Apache
> Set-Cookie: symfony=c648e78b160e6ed7b196a85377e53e3a; path=/
> Content-Length: 163979
> Cache-Control: max-age=600
> Content-Type: application/json
> X-Cache: MISS from cache-01
> X-Cache-Lookup: MISS from cache-01:80
> Connection: close
>
> (The json file is generated by an application using Symfony ...)
>
> Why, in spite of Cache-Control header, Squid doesn't cache the file ?
>
> Here the cache policy:
>
> ### object size in cache
> maximum_object_size_in_memory 4096 KB
> minimum_object_size 0 KB
> maximum_object_size 32800 KB
> minimum_expiry_time 30 seconds
>
> ### cache replacement policy
> cache_replacement_policy heap LFUDA
> memory_replacement_policy heap LFUDA
>
> Thank you in advance.
>

Anything else in the config?

refresh_pattern, cache, hierarchy_stoplist are more critical with this
object. Particularly since it lacks a last-modified header.
The recent data attached hints that IMS requests are likely to return a
completely new object when a refresh check is performed. This may wipe
out any stored record of age on every request.

Amos

-- 
Please be using
   Current Stable Squid 2.7.STABLE9 or 3.1.8
   Beta testers wanted for 3.2.0.2
Received on Fri Sep 10 2010 - 10:58:41 MDT

This archive was generated by hypermail 2.2.0 : Fri Sep 10 2010 - 12:00:04 MDT