Well, we were in the same situation except we basically never wanted the 
cached object to expire automatically.  Setting expires was out because the 
web database we were using to get to the database couldn't handle it (and 
Netscape Server didn't seem to wanna help out either).
I solved this by:
(a) Hacking squid to always ignore "no-cache".
    In icp.c:
#ifdef ALLOW_NOCACHE 
#ifdef RELOAD_INTO_IMS
        if (Config.Options.reload_into_ims)
        BIT_SET(request->flags, REQ_NOCACHE_SPECIAL);
        else
#endif
        BIT_SET(request->flags, REQ_NOCACHE);
#endif
    By adding the first and last lines of this snippet to the program, then 
no-cache will be ignored unless "ALLOW_NOCACHE" is defined in the Makefile.
(b) Wrote a program that, given parameters of the URL, parse through the cache 
log and delete those files from the cache that match the parameters.
Our site is completely database driven and dynamic, yet we get a cached page 
view ratio of about 80%.  Although they are not included in that total, almost 
all images are cached (which, if counted, would drive the cache ratio up over 
95%). Any pages that either shouldn't be cached, or need to be cleared from 
cache at certain points during the day are handled by stoplists and a cron job 
that deletes the files directly from the cache.
The other solution we tried for a little while was hacking the squid code to 
look for 'ih-cache' instead of 'no-cache' and then make the same modification 
to several browser binaries.  It basically let only us "clear" the cache by 
hitting "reload" on our hacked browsers.
- Tony
Received on Wed Sep 23 1998 - 07:24:51 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:11 MST