Re: Trub cacheing www.cnn.com

From: Ivan Leong <[email protected]>
Date: Thu, 14 Nov 1996 10:18:23 +0800 (SGT)

> I'm finding that my Squid (1.0.15) is often serving out-of-date pages
> from www.cnn.com. The CNN site does not seem to use Last-modified or
> Expires headers.
>
> So I devised the following rules, which don't seem to work!
>
> ttl_pattern www.cnn.com/.*htm 360 20% 360
> ttl_pattern www.cnn.com/$ 360 20% 360
>
> What I am trying to achieve is that http://www.cnn.com/ (the root page)
> and all htm/html files only cached for a maximum of 6 hours but that
> graphics are cached by my default rules as normal.
>
> I realise I could use:
>
> ttl_pattern www.cnn.com 360 20% 360
>
> But then everything on the whole site would only be cached for 6 hours
> and most of the graphics (headers, menus etc) don't change from day to day.
>
> Does anyone else have this problem and have you found a suitable solution?

ttl_pattern or refresh_pattern?

refresh_patterns are done on a first-match basis, so your problem is
simply solved by:

refresh_pattern/i \.(jpg|gif)$ 5 200% 10080
refresh_pattern/i \.(mov|avi)$ 5 300% 15120
refresh_pattern/i www\.cnn\.com 5 20% 360

to others on this mlist, how abt swapping refresh_patterns on your
site? who has done clever tricks, like the above for cnn.com?

---
Ivan Leong <ivanl@pacific.net.sg>            the power to move
Systems Engineer, Pacific Internet           http://ilsp.pacific.net.sg/
Received on Wed Nov 13 1996 - 18:18:29 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:33:32 MST