Jump to: navigation, search
This page is a translated version of the page Manual:$wgFileCacheDirectory and the translation is 20% complete.

Other languages:
English • ‎français • ‎日本語 • ‎polski
File Cache: $wgFileCacheDirectory
Directory where the cached pages will be saved when using server-side caching.
導入されたバージョン: pre 1.1.0
除去されたバージョン: 使用中
可能な値: 絶対パス
既定値: "{$wgUploadDirectoryManual:$wgUploadDirectory}/cache"
(注: この変数の既定値は、他の変数に依存します。例えば、LocalSettings.phpManual:LocalSettings.php の実行後に Setup.phpManual:Setup.php 内で値が設定される変数です)
他の設定: アルファベット順 | 機能順


If you switch on server-side file caching $wgUseFileCacheManual:$wgUseFileCache = true;, then you can use this variable to specify where the cached pages will be saved on your server filesystem.

It's an absolute path, so you could specify somewhere under /tmp for example:

$wgFileCacheDirectory = "/tmp/yourcache";

...but you can specify this absolute path in relation to other directory path variables, e.g.:

$wgFileCacheDirectory = "{$wgUploadDirectory}/cache";

This specifies a "cache" directory under the image uploads directory (normally called "images"). This is the default setting in fact.

注 注: In some versions, you must create the directory and ensure it is writeable (by the php user). This is even true if you leave it as the default (you must create e.g. the "images/cache" directory). It appears that in at least 1.15+ the directory will be created for you if it can be.

注 注: If you are hosting multiple wikis from a shared source, you must ensure each has its own separate cache directory to avoid mis-serving pages with the same name (the Main Page, for example).