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.
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?
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.
(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.
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".
The lack of a merge function is a real bug, not really something that should be documented.