Re: [squid-users] Using squid to cache a video file

From: Amos Jeffries <squid3@dont-contact.us>
Date: Thu, 9 Aug 2007 11:12:06 +1200 (NZST)

> Hi,
>
> i have a servlet which returns content of a video file:
> like this:
> http://127.0.0.1:8080/videoServlet?id=1
> http://127.0.0.1:8080/videoServlet?id=2
>
> I hit that servlet thru squid as the proxy.
> I do this to query if squid does cache the video file:
>
> ./squidclient -H "Cache-Control: only-if-cached\n"
> "http://127.0.0.1:8080/videoServlet?id=1"
>
<snip>
>
> Can you please tell me why squid can't cache a video file?

Firstly,
Check the webserver is providing the proper Cache-Control, and/or Expires
headers that allow caching.

Secondly,
If you are using the default squid.conf settings:
 acl QUERY urlpath_regex cgi-bin \?
 cache deny QUERY

 that will prevent anything with a dynamic query-string from being cached.
You maybe want to use something like:
 acl Servlet urlpath_regex videoServlet\?
 cache allow Servlet

ahead of that default config line.

Amos

> Thank you.
>
Received on Wed Aug 08 2007 - 17:12:09 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Sep 01 2007 - 12:00:03 MDT