[squid-users] Caching uncachable resources
Andrey K
ankor2023 at gmail.com
Wed Apr 26 11:00:30 UTC 2023
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
>
On the client side I see:
< HTTP/1.1 200 OK
< Server: nginx
< Date: Wed, 26 Apr 2023 10:37:29 GMT
< Content-Type: video/MP2T
< Content-Length: 1955200
< Expires: Thu, 01 Jan 1970 00:00:01 GMT
< Cache-Control: no-cache
< Access-Control-Allow-Origin: *
< access-control-allow-headers: x-vsaas-session, x-no-redirect, origin,
authorization, accept, range, x-device-screen,x-locale,x-timezone
< access-control-expose-headers: Server, range, X-Run-Time, Content-Length,
Location, x-id, x-shard, x-vhost-ver, cache
< Cache: HIT
< X-Cached-Since: 2023-04-25T07:43:43+00:00
< X-ID: m9p-up-gc39
< Accept-Ranges: bytes
< X-Cache: MISS from 0001vsg02
< X-Cache-Lookup: MISS from 0001vsg02:3131
< Connection: keep-alive
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?
Kind regards,
Ankor.
вт, 25 апр. 2023 г. в 17:53, Amos Jeffries <squid3 at treenet.co.nz>:
> On 25/04/2023 9:45 pm, Andrey K wrote:
> > Hello,
> >
> > We are trying to cache some resources, but they respond in the header
> > with the attributes that prevent caching:
> >
> > 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
> >
> > Thus, we see TCP_MISS in the logs.
> > Is it possible to configure squid in such a way that it ignores
> > *Cache-control=no-cache* and *Expires *attributes and takes responses
> > from the cache?
> >
>
> This is **not** uncacheable. As shown by "Cache: HIT" there was an
> object found in the cache.
>
> The "Expires" header is overridden by the existence of Cache-Control
> header. So ignore that.
>
> The Cache-Control:no-cache actually means Squid can cache the response,
> but *must* contact the origin server before using a HIT.
>
> For some reason the origin produced a newer version of the object thus
> the log says "MISS".
>
> HTH
> Amos
> _______________________________________________
> squid-users mailing list
> squid-users at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20230426/9794c77a/attachment.htm>
More information about the squid-users
mailing list