httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthieu Estrade <>
Subject Re: httpd 2.2 cache - disable and enable
Date Thu, 12 Oct 2006 12:26:21 GMT
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.


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 

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 

View raw message