[squid-users] Squid Reverse Proxy and WebDAV caching

Amos Jeffries squid3 at treenet.co.nz
Wed Aug 30 11:13:10 UTC 2017


On 30/08/17 22:17, Olivier MARCHETTA wrote:
> Hello Amos,
> 
> This morning, for some reasons, I can't reproduce the Hits in the memory.
> Squid is only routed for tenant.sharepoint.com so I don't know what I was Hitting yesterday.
> 
> But I have collected extended info.
> I repeatedly loaded the same .jpg file several times.
> Always a Miss (high latency to access the file).
> Information below:
> 
> Logs from the client (by Fiddler)
> -------------------------------------------------------------------------
> GET /sites/Marketing/Shared%20Documents/test_img_1.jpg HTTP/1.1
> Cache-Control: no-cache

The above as a request header forbids cached content being delivered.

You will need either the reload-into-ims option on refresh_pattern, or 
the ignore-cc option on your http_port line (use only as a last resort).

> Connection: Keep-Alive
> Pragma: no-cache
> User-Agent: Microsoft-WebDAV-MiniRedir/10.0.14393
> translate: f
> Host: tenant.sharepoint.com
> Cookie: FedAuth=*
> 
> HTTP/1.1 200 OK
> Cache-Control: private,max-age=0
> Content-Length: 1708509
> Content-Type: image/jpeg
> Expires: Tue, 15 Aug 2017 09:53:27 GMT
> Last-Modified: Tue, 29 Aug 2017 14:06:14 GMT

Strange content, it expires 2 weeks before it was created/modified.


> Accept-Ranges: bytes
> ETag: "{852B897C-67C8-4620-AC40-53FB915EB62D},7"
<snip>
> Date: Wed, 30 Aug 2017 09:53:26 GMT
> X-Cache: MISS from squidserver.local
> Via: 1.1 squidserver.local (squid/3.5.26)
> Connection: keep-alive
> -------------------------------------------------------------------------
> 

Anyhow, this response is stale on delivery (max-age=0 and Expires 
timestamp older than Date timestamp). So to cache it you will also need 
the "store-stale" option on your matching refresh_pattern line.

You might also want to setup a limit on staleness with max_stale global 
directive, or max-stale=N refresh_pattern option.



Amos



More information about the squid-users mailing list