I think you are right.

However, be aware that there has been a problem with the implementation of 
CacheDisable in Apache 2.0.51 and 2.0.52: 
http://issues.apache.org/bugzilla/show_bug.cgi?id=31128

-ascs

-----Original Message-----
From: john doe [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 16, 2005 2:43 AM
To: [email protected]
Subject: [EMAIL PROTECTED] Re: apache2: mod_cache: the order of CacheEnable and 
CacheDisable

Since nobody has replied so, I looked into its supposed source code:
http://lxr.webperf.org/source.cgi/modules/cache/cache_util.c

The logic seems to be like this:
1. If a url matches ANY of the CacheDisable entries, don't cache it and END of 
program.
2. Else if a url matches ANY of the CacheEnable entries, cache it and End of 
program.
3. Else don't cache it and End of Program.

Based on the code, I conclude:
1. Order of CacheEnable and CacheDisable doesn't matter - they can be mixed in 
any order.
2. CacheDisable takes higher priority over CacheEnable, a conservative and 
prudent approach (which I happen to agree in lieu of a more sophisticated 
water-down rule system as in Squid).

Any comments?
-jd

On 6/13/05, john doe <[EMAIL PROTECTED]> wrote:
> By reading the apach2 doc, it's not clear what would happen if a 
> mixture of CacheEnable and CacheDisable is present in the conf file.
> Consider the following two examples:
> Example1:
>      CacheEnable /
>      CacheDisable /cgi
> Example2:
>      CacheDisable /cgi
>      CacheEnable /
> In either case,  is /cgi cached?
> -jd
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to