[squid-users] Caching uncachable resources

Amos Jeffries squid3 at treenet.co.nz
Thu Apr 27 17:43:47 UTC 2023


On 26/04/2023 11:00 pm, Andrey K wrote:
> Hello, Amos,
>
> Thank you for the information.
> The headers I included in the previous message were taken from the 
> "outside" proxy interface, i.e. were sent by the original content 
> server (I think it is a CDN):
> >
> >     Content-Type: video/MP2T
> >     *Expires: Thu, 01 Jan 1970 00:00:01 GMT*
> >     *Cache-Control: no-cache*
> >     Cache: HIT
> >     X-Cached-Since: 2023-04-25T07:43:41+00:00
> >
>

Ah, I see. Well both Age and Date are missing from that response. They 
matter for your cache.

> On the client side I see:
> < HTTP/1.1 200 OK
> < Server: nginx
> < Date: Wed, 26 Apr 2023 10:37:29 GMT
> < Expires: Thu, 01 Jan 1970 00:00:01 GMT
> < Cache-Control: no-cache
> < Cache: HIT
> < X-Cached-Since: 2023-04-25T07:43:43+00:00
> < X-Cache: MISS from 0001vsg02
> < X-Cache-Lookup: MISS from 0001vsg02:3131

> I would rephrase my question: is it possible to configure squid so 
> that it caches files with the extension ".ts" despite the caching 
> control headers passed by OCS and serves user requests from the cache?
>

The file extension has no relevance in HTTP. All that matters is whether 
the server says it is possible, and whether your local rules permit 
caching to obey those server

A lot of things apply to cacheability. The reply headers you have shown 
indicate that the response is cacheable. So to get a full answer you 
will need to supply the request headers of the request from client, and 
resulting requests (possibly multiple) between squid and server.


Amos


More information about the squid-users mailing list