Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 24839 invoked from network); 4 Aug 2004 20:52:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Aug 2004 20:52:29 -0000 Received: (qmail 40478 invoked by uid 500); 4 Aug 2004 20:52:03 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 40363 invoked by uid 500); 4 Aug 2004 20:52:02 -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: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 40289 invoked by uid 99); 4 Aug 2004 20:52:01 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [64.236.240.190] (HELO web.turner.com) (64.236.240.190) by apache.org (qpsmtpd/0.27.1) with ESMTP; Wed, 04 Aug 2004 13:52:00 -0700 Received: from [10.188.51.42] (642p.turner.com [10.188.51.42]) by web.turner.com (8.12.9/8.12.9) with ESMTP id i74Kpug0016278 for ; Wed, 4 Aug 2004 16:51:56 -0400 (EDT) Message-ID: <41114C70.3000704@web.turner.com> Date: Wed, 04 Aug 2004 16:52:00 -0400 From: Brian Akins User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040715 Debian/1.7.1-1 X-Accept-Language: en MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: [PATCH] mod_disk cached fixed References: <4110DCFF.3010007@web.turner.com> <41114683.6090809@web.turner.com> <411147E2.4030408@wstoddard.com> In-Reply-To: <411147E2.4030408@wstoddard.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Bill Stoddard wrote: > This is the area in which mod_cache is most broken. It does not handle > vary at all, thus the content needs to be stored before it is touched > by any filters. But that doesn't work either because some filters will > not properly run when serving content out of a quick_handler (ie, they > might rely on some special something happening in the fixups hook for > instance). Can't recall any exact scenarios right off the top of my > busy brain but I know they exist. Would be real good to get this fixed > in 2.2 So, basically, we would need to parse Vary headers and, possibly, store mulitple versions of the same uri. The vary header should just be Header names. Possible scenerio: Serving cached content: - lookup uri in cache (via md5?). - check varies - a list of headers to vary on - caculate new key (md5) based on uri and clients value of these headers - lookup new uri in cache - continue as normal Caching an object: -see if object has been cached before by looking up uri in cache -do the Vary's match? -no, discard old entry(?) and create new uri entry -yes, generate new key based on client values -continue as normal Also, if there are no Vary's on an object, there is no second key/entry. Sound reasonable? The thing that sucks is if you vary on User-Agent. You wind up with a ton of entries per uri. I cheated in another modules by "varying" on an environmental variable. Kind of like this: BrowserMatch ".*MSIE [1-3]|MSIE [1-5].*Mac.*|^Mozilla/[1-4].*Nav" no-gzip and just "vary" on no-gzip (1 or 0), but this may be hard to do just using headers... -- Brian Akins Senior Systems Engineer CNN Internet Technologies