Re: [squid-users] Add TCP_HIT for custom URL

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Mon, 22 Jun 2009 11:14:18 +1200

On Sun, 21 Jun 2009 13:15:17 -0300, Joaquim Pedro França Simão
<osmano807_at_gmail.com> wrote:
> I developed a software (url_rewrite) that saves the videos on youtube
> in a folder, and every time the video is saved, it sends the file
> already saved to the client. This saves sharply the use of the
> Internet.
>
> What I want is that the squid marks all the url's from my server as
> HIT, for readability of the logs, it is very difficult to see if this
> video is already in cache or not.
>
> (sorry for any failure in understanding, I am using a translator, I
> speak Portuguese).

Squid-2.7 with storeurl_rewrite is what you want to be using. It's created
expressly for doing what you do.

Only instead of making its own copy of the video and redirecting to that it
uses your re-writer to combine URLs so the multiple names for each
identical video are cached as one.

Worst case if you can't move to 2.7, is that you need to make the web
server providing the local copy send the right headers so the video can be
cached by Squid only when arriving from the local server.

HTH
Amos
Received on Sun Jun 21 2009 - 23:14:21 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 22 2009 - 12:00:03 MDT