Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 56227 invoked from network); 12 Oct 2006 12:26:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Oct 2006 12:26:46 -0000 Received: (qmail 71487 invoked by uid 500); 12 Oct 2006 12:26:42 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 71454 invoked by uid 500); 12 Oct 2006 12:26:41 -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 71443 invoked by uid 99); 12 Oct 2006 12:26:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2006 05:26:41 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [195.200.162.158] (HELO AXIS2.axiliance.com) (195.200.162.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 12 Oct 2006 05:26:41 -0700 Received: from [192.168.100.32] ([192.168.100.32]) by AXIS2.axiliance.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 12 Oct 2006 14:26:21 +0200 Message-ID: <452E346D.6060508@apache.org> Date: Thu, 12 Oct 2006 14:26:21 +0200 From: Matthieu Estrade User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: httpd 2.2 cache - disable and enable References: <452D07F5.8000108@apache.org> <20061011151130.GA17673@dochas.stdlib.net> <452D0AA4.9060609@apache.org> <452DFEE8.2040803@hippo.nl> In-Reply-To: <452DFEE8.2040803@hippo.nl> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 12 Oct 2006 12:26:21.0296 (UTC) FILETIME=[9FF5BF00:01C6EDF9] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Bart van der Schans a �crit : > Matthieu Estrade wrote: > >> Colm MacCarthaigh a �crit : >> I agree on this point, but people using this directive choose to loose >> time on this regexp check. >> The problem i have is many people wants to enable cache on .gif and >> .jpeg and .pdf, but they don't know the exact path. >> > Wouldn't it be easier to do a match on mime type, like ExpiresByType? > > Bart > > It could be great to do it by type, but it can have a big side effect. Usually, resources not identified by extension are resources delivering content based on dynamic information. If these dynamic information are not in the query string, it's definitively dead to do caching on this resource. ex: script.php?action=gimme_pdf will return a pdf content Cookie: phpsessionid=JKHdheehKJHEDJKHhe script.php?action=display_my_account return html. Cookie: phpsessionid=6537656356753 There is nothing in the key to make the difference between two different user, and in this case, user 1 who has his account page cached, user2 will see user1 account page... So caching by mime type is good but when you have already identified correctly the resource. We could imagine some CacheEnablePerMimeType and CacheDisablePerMimeType. IMHO, a regexp based cache enable or disable could be very usefull for a default caching policy shipped with httpd. We could do per default caching only on all images, css and all static content.