Manual:$wgFileCacheDepth: Difference between revisions
mNo edit summary |
Lint errors |
||
Line 7: | Line 7: | ||
|range=0–32 |
|range=0–32 |
||
|default=2 |
|default=2 |
||
⚫ | |||
|summary=<translate><!--T:1--> |
|||
⚫ | |||
}} |
}} |
||
<translate> |
<translate> |
||
Line 14: | Line 13: | ||
<!--T:3--> |
<!--T:3--> |
||
This variable controls the depth of the subdirectory hierarchy created under <tvar|FileCacheDirectory>< |
This variable controls the depth of the subdirectory hierarchy created under <tvar|FileCacheDirectory><code>{{ll|Manual:$wgFileCacheDirectory|$wgFileCacheDirectory}}</code></> to store cached pages when <tvar|UseFileCache><code>{{ll|Manual:$wgUseFileCache|$wgUseFileCache}} = true;</code></>. |
||
<!--T:4--> |
<!--T:4--> |
||
Line 26: | Line 25: | ||
</translate> |
</translate> |
||
:< |
:<code>{{ll|Manual:$wgFileCacheDirectory|$wgFileCacheDirectory}}/0/0a/Example.html</code> |
||
<translate> |
<translate> |
||
Line 36: | Line 35: | ||
<translate> |
<translate> |
||
<!--T:9--> |
<!--T:9--> |
||
However, if your wiki is small, or if you know your file system can handle huge directories efficiently, you might want to set < |
However, if your wiki is small, or if you know your file system can handle huge directories efficiently, you might want to set <code>$wgFileCacheDepth = 0;</code> to get rid of the intermediate directories entirely.</translate> |
||
<translate> |
<translate> |
||
<!--T:10--> |
<!--T:10--> |
Revision as of 21:51, 21 April 2017
File Cache: $wgFileCacheDepth | |
---|---|
Depth of subdirectory hierarchy under $wgFileCacheDirectory . |
|
Introduced in version: | 1.17.0 (r77843) |
Removed in version: | Still in use |
Allowed values: | 0–32 |
Default value: | 2 |
Other settings: Alphabetical | By function |
Details
This variable controls the depth of the subdirectory hierarchy created under $wgFileCacheDirectory
to store cached pages when $wgUseFileCache = true;
.
By default, two levels of intermediate directories are created, matching the behavior in MediaWiki 1.16 and earlier. The directories are named using prefixes of the hexadecimal MD5 hash of the page title. For example, if the title of the page was "Example" (which has the MD5 hash "0a52730597fb4ffa01fc117d9e71e3a9"), the file in which the cached page was stored would be named:
$wgFileCacheDirectory /0/0a/Example.html
The purpose of the subdirectory hierarchy is to spread the cached files evenly around several directories, thereby reducing the number of files in each individual directory.
On some file systems, this can improve performance if the number of cached pages is large.
However, if your wiki is small, or if you know your file system can handle huge directories efficiently, you might want to set $wgFileCacheDepth = 0;
to get rid of the intermediate directories entirely.
(Conversely, if your wiki is huge, you could try increasing the value to spread the files over even more directories.)
See also
[[Category:Cache variablesTemplate:Translation]]