Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 45686 invoked from network); 17 Aug 2005 20:11:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Aug 2005 20:11:08 -0000 Received: (qmail 99053 invoked by uid 500); 17 Aug 2005 20:11:04 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 98814 invoked by uid 500); 17 Aug 2005 20:11:03 -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 98800 invoked by uid 99); 17 Aug 2005 20:11:03 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2005 13:11:03 -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 [64.236.25.90] (HELO cnnimail33.turner.com) (64.236.25.90) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Aug 2005 13:11:22 -0700 Received: from turner.com (10.165.244.17) by cnnimail33.turner.com with ESMTP; 17 Aug 2005 16:11:02 -0400 Received: from [10.188.50.126] (GN2Y011-udp05122128uds.turner.com [10.188.50.126]) by web.turner.com (8.12.9/8.12.9) with ESMTP id j7HKB1Qe007227 for ; Wed, 17 Aug 2005 16:11:01 -0400 (EDT) Message-ID: <430399D5.4080201@turner.com> Date: Wed, 17 Aug 2005 16:11:01 -0400 From: Brian Akins User-Agent: Mozilla Thunderbird 1.0.6 (Macintosh/20050716) X-Accept-Language: en-us, en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: [PATCH] mod_disk_cache deterministic tempfiles References: <430398AA.2040609@sharp.fm> In-Reply-To: <430398AA.2040609@sharp.fm> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Graham Leggett wrote: > This is very cool. On my list of things to do was to handle something > similar for serving from the cache as well - again to avoid a thundering > herd against backend servers while a file is being cached. I have the thought that we could also serve files that have "recently expired" (recent being configurable) if the object was being cached. Psudocode: if(expired < (now - recent)) { if(stat(tmpfile) { if(mtime_is_resonable) { serve_old_file; } else { unlimk(tempfile) } } } This would also allow only one request through to "refresh" the object and protect against a "hung" worker (bad backend server, database, whatever) -- Brian Akins Lead Systems Engineer CNN Internet Technologies