[squid-users] Caching content-ype : video/MP2T

Amos Jeffries squid3 at treenet.co.nz
Mon Jan 20 02:15:42 UTC 2020


On 16/01/20 5:43 am, Farid Agha wrote:
> Hi all,
> 
> After reading archives and FAQ, I send this email. 
> 
> My main goal is to cache segments of a live video. The content-type is
> video/MP2T and the extension is .ts
> 
> I'm actually in explicit proxy and the cache is working fine for all
> files except this content-type.

Some content is simply not cacheable. The hint there is the word *live*.
Content from a cache is never "live" - it is *old* / past / previous /
outdated / obsolete.


> 
> Here after my configuration :
> 
...
> 
> #refresh_pattern ^ftp: 1440 20% 10080
> #refresh_pattern ^gopher: 1440 0% 1440
> refresh_pattern . 0 100% 4320 ignore-no-store

VERY bad idea. 'no-store' and similar HTTP violations should be
performed as conservatively as possible. Only applied as a last resort
to fix a specific sites problems.

> 
> request_header_access Cache-Control deny all

This breaks *other* caches on machines upstream or downstream of yours.
It has no effect on your proxy. Please remove.


> cache allow all

This is the default behaviour for Squid. You can remove the above line.


> 
> My squid version is : 4.4
> 

Please upgrade.


> An access.log portion : 
> 
> 1579103694.775 42 10.12.0.6 TCP_*MISS*/200 1154117 GET
> http://xxx.xxx.net/i/2_1@799489/segment157910368_700_av-p.ts? -
> HIER_DIRECT/104.123.50.35 video/MP2T
> 1579103704.762 42 10.12.0.6 TCP_*MISS*/200 1223301 GET
> http://xxx.xxx.net/i/2_1@799489/segment157910369_700_av-p.ts? -
> HIER_DIRECT/104.123.50.35 video/MP2T
> 1579103714.688 70 10.12.0.6 TCP_*MISS*/200 1205253 GET
> http://xxx.xxx.net/i/2_1@799489/segment157910370_700_av-p.ts? -
> HIER_DIRECT/104.123.50.35 video/MP2T
> 
> Somebody has experience on that, is that possible ?

Difficult to say without the details you have removed.

Take a visit to redbot.org and paste the full URL - include the domain
name and query-string parameters which are not being logged. It will
tell you whether the resource is cacheable and why or why not.


HTH
Amos


More information about the squid-users mailing list