Bug 41763 - mod_disk_cache ignores CacheDirLevels and CacheDirLenght directives
Summary: mod_disk_cache ignores CacheDirLevels and CacheDirLenght directives
Status: REOPENED
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_cache_disk / mod_disk_cache (show other bugs)
Version: 2.2.3
Hardware: HP Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-05 03:00 UTC by Eric Suran
Modified: 2007-03-14 14:32 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Suran 2007-03-05 03:00:03 UTC
I run httpd 2.2.3 on Linux 2.4.21-47.0.1.ELsmp (RedHat ES3) and I have enabled
mod_disk_cache for several sites. Directives CacheDirLength and CacheDirLevels 
are respectively set to 1 and 2.

Problem : subdirectories under CacheRoot directory are 2 characters long instead
of 1, and 3 subdirectories are created.

Httpd processes have been stopped and restarted after configuration changes and
all files and directories under CacheRoot directories deleted.

The same problem is reproduced with httpd 2.2.4.
Comment 1 Ruediger Pluem 2007-03-05 13:04:01 UTC
Sorry but I cannot reproduce this problem with 2.2.4. I guess something is wrong
with your configuration such that you fall back to the default values. Have you
set some of mod_disk_caches directives inside a virtual host and some outside of
a virtual host?
Comment 2 Eric Suran 2007-03-06 03:50:04 UTC
The involved directives are not redefined inside the virtual hosts configuration
but this is done for CacheRoot directive.

Our configuration looks like this :

CacheRoot /a/
CacheDirLength 1
CacheDirLevels 2
...
<VirtualHost xxx>
CacheRoot /a/xxx
</VirtualHost xxx>

<VirtualHost yyy>
CacheRoot /a/yyy
</VirtualHost yyy>


Then we have performed more tests and the problem is corrected if we redefined
CacheDirLength and CacheDirLevels inside the virtual host configuration.
So, we guess the problem is CacheRoot directive override the previous
configuration with the default values.
Comment 3 Ruediger Pluem 2007-03-06 13:14:23 UTC
(In reply to comment #2)

> Then we have performed more tests and the problem is corrected if we redefined
> CacheDirLength and CacheDirLevels inside the virtual host configuration.
> So, we guess the problem is CacheRoot directive override the previous
> configuration with the default values.

Well analysed. This is exactly the case. The reason is that there is no function
to merge per-server configs.
Comment 4 Eric Suran 2007-03-07 02:26:14 UTC
OK, thank you. Then we will update our configuration...

Do you know if a such function will be developed ?
Additionally, maybe default setting could be changed accordingly to the
recommended values as describe in "caching guide".

Comment 5 Joe Orton 2007-03-14 14:32:21 UTC
The lack of a merge function is a real bug, not really something that should be
documented.