httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm MacCarthaigh <>
Subject Re: mod_cache wishlist
Date Tue, 23 Aug 2005 13:22:23 GMT
On Tue, Aug 23, 2005 at 08:42:48AM -0400, Brian Akins wrote:
> Deterministic temp files to avoid "thundering herd":
> Especially Colm's comments:
> Content definitely should not be served from the cache after it has
> expired imo. However I think an approach like;
>     if((now + interval) > expired) {
>         if(!stat(tmpfile)) {
> 	    update_cache_from_backend();
> 	}
>     }
> ie "revalidate the cache content after N-seconds before it is due to be
> expired" would have the same effect, but avoid serving stale content.

To a large extent mod_cache_requester (which from inspection seems to be
much further along than I thought) will solve this problem :)

> CacheVaryOverride:
> This necessary in the case of reverse proxies, not that useful for 
> normal proxies.

Is useful though.

> Replace current CacheEnable/Disable with a more squid like approach:

I've been looking at this, and it's possibly the Syntax that put me off,
but it looks painful on the admin, and probably on the server too.
There's nothing in those examples that can't be achieved by making the
non-CacheEnable cache directives per-dir, which I'd personally prefer
(and have working). 

But it's years since I've run squid in production, what kind of complex
rules do people use?

> Add a hook that gets called after store_body so that other modules can 
> track cache usage.  The other modules could use the mythical 
> ap_cache_query() I described above to update cache usage in a database, 
> file, dbm, shared memory, etc.  A great use would be if this information 
> was in a database (using mod_dbd, perhaps) so that an admin (or script) 
> could selectively expire and purge cache entries.  This could also lead 
> to a much more efficient version of htcacheclean that did not have to 
> crawl the directory tree.

That's what I had in-mind with htcacheadmin, but a module version does
make a lot of sense, purging a memory cache for example. Though I'm not
sure of the need for a dbd, that's a lot of overhead when an admin
could just specify a URL they want to expire manually.

Colm MacCárthaigh                        Public Key:

View raw message