Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 10624 invoked from network); 23 Aug 2005 13:22:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Aug 2005 13:22:30 -0000 Received: (qmail 95838 invoked by uid 500); 23 Aug 2005 13:22:29 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 95023 invoked by uid 500); 23 Aug 2005 13:22:27 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 95010 invoked by uid 99); 23 Aug 2005 13:22:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2005 06:22:27 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [82.195.144.76] (HELO loughan.stdlib.net) (82.195.144.76) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Aug 2005 06:22:44 -0700 Received: from colmmacc by loughan.stdlib.net with local (Exim 4.50) id 1E7YjP-0003QU-OY for dev@httpd.apache.org; Tue, 23 Aug 2005 14:22:23 +0100 Date: Tue, 23 Aug 2005 14:22:23 +0100 From: Colm MacCarthaigh To: dev@httpd.apache.org Subject: Re: mod_cache wishlist Message-ID: <20050823132223.GA12690@stdlib.net> Reply-To: colm@stdlib.net References: <430B19C8.10408@web.turner.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <430B19C8.10408@web.turner.com> User-Agent: Mutt/1.5.9i X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Tue, Aug 23, 2005 at 08:42:48AM -0400, Brian Akins wrote: > Deterministic temp files to avoid "thundering herd": > > http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=112430743432417&w=2 > > 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: > > http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=112430527822904&w=2 > > 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: > > http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=112447805318053&w=2 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: colm+pgp@stdlib.net