https://bz.apache.org/bugzilla/show_bug.cgi?id=63232

--- Comment #1 from Rich Bowen <[email protected]> ---
The documentation for CacheDirLength correctly states the default
is 2, which matches the code (DEFAULT_DIRLENGTH in
mod_cache_disk.h, line 66).

However, the caching guide (caching.html) recommends a value of 1,
stating: "Unless you have a good reason not to, using a setting of
1 for CacheDirLength is recommended."

When our own documentation recommends a value different from the
default, that's a signal that the default should change. Defaults
should reflect best practice so that users get good behavior out of
the box without needing to discover and follow a recommendation
buried in a guide page.

Proposing we change DEFAULT_DIRLENGTH from 2 to 1 in
modules/cache/mod_cache_disk.h to match the documented
recommendation.

Patch:

--- a/modules/cache/mod_cache_disk.h
+++ b/modules/cache/mod_cache_disk.h
@@ -65,2 +65,2 @@
 #define DEFAULT_DIRLEVELS 2
-#define DEFAULT_DIRLENGTH 2
+#define DEFAULT_DIRLENGTH 1

Update directive docs default in
docs/manual/mod/mod_cache_disk.xml:

-    <default>CacheDirLength 2</default>
+    <default>CacheDirLength 1</default>

And update the recommendation in docs/manual/caching.xml
(around line 497) since the advice now matches the default:

-      <p>The overall aim of this technique is to reduce the number of
-      subdirectories or files that may be in a particular directory,
-      as most file-systems slow down as this number increases. With
-      setting of "1" for
-      <directive module="mod_cache_disk">CacheDirLength</directive>
-      there can at most be 64 subdirectories at any particular level.
-      With a setting of 2 there can be 64 * 64 subdirectories, and so on.
-      Unless you have a good reason not to, using a setting of "1"
-      for <directive module="mod_cache_disk">CacheDirLength</directive>
-      is recommended.</p>
+      <p>The overall aim of this technique is to reduce the number of
+      subdirectories or files that may be in a particular directory,
+      as most file-systems slow down as this number increases. With
+      the default setting of "1" for
+      <directive module="mod_cache_disk">CacheDirLength</directive>
+      there can at most be 64 subdirectories at any particular level.
+      With a setting of 2 there can be 64 * 64 subdirectories, and so on.
+      The default of "1" is appropriate for most configurations.</p>

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to