[squid-users] Sub-minute caching

From: Troels Arvin <troels@dont-contact.us>
Date: Sun, 04 Nov 2001 13:45:36 +0100

Hello,

At my work, we have been using Squid as an accelerating cache for a
year now, with great results.

I would like to make Squid cache URLs which will time out within e.g. 20
seconds. However, Squid seems to be programmed to forget about URLs
which will not live for a least a minute.

Therefore, I used this patch with STABLE1:

--- squid-2.4.STABLE1-orig/src/refresh.c Sun May 13 03:38:24 2001
+++ squid-2.4.STABLE1/src/refresh.c Sun May 13 03:38:50 2001 @@
-327,7 +327,7 @@
     * 60 seconds delta, to avoid objects which expire almost *
     immediately, and which can't be refreshed. */
- int reason = refreshCheck(entry, NULL, 60);
+ int reason = refreshCheck(entry, NULL, 1);
     refreshCounts[rcStore].total++;
     refreshCounts[rcStore].status[reason]++; if (reason < 200)

The patch doesn't seem to work with STABLE 2. I'm about to investigate
the problem. - But before I do that: Is there a better way to obtain
sub-minute caching with Squid?

And before someone tells me that sub-minute caching is stupid: I don't
think so. If the web-site receives 20 requests per second for a given
(potentially database-based) URL, then a lot of Apache (and database)
work may be saved if Squid caches the URL for - say - 20 seconds.

-- 
Greetings from Troels Arvin, Copenhagen, Denmark
System administrator at TV 2/interaktiv
Received on Sun Nov 04 2001 - 05:47:19 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:03:52 MST