Jump to content

Manual:$wgUseFileCache: Difference between revisions

From mediawiki.org
Content deleted Content added
m <languages/>
m Fix old source tag
 
(19 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<languages/>
<languages/>
{{ {{TNTN|SettingSummary}}
{{SettingSummary
|name=UseFileCache
|name=UseFileCache
|version_min=pre 1.1.0
|version_min=pre 1.1.0
|section=File Cache
|section=File Cache
|range=<translate>(boolean)</translate>
|range=<translate><!--T:1--> (boolean)</translate>
|default=false
|default=<syntaxhighlight lang="php" inline>false</syntaxhighlight>
|summary=<translate>This will cache static pages for non-logged-in users to reduce database traffic on public sites.</translate>
|summary=<translate><!--T:13--> Create static HTML pages for unregistered viewers to reduce database traffic.</translate>
}}
}}
<translate>
<translate>
== Details ==
== Details == <!--T:3-->
</translate>
<translate><!--T:4--> Set to <tvar|true><code>true</code></> to activate the server-side file cache.</translate>
<translate><!--T:14--> The cache consists of static HTML pages that are served to unregistered viewers to reduce database traffic.</translate>


<translate><!--T:15--> The HTML pages will be created in the directory specified by <tvar|1><code>{{ll|Manual:$wgFileCacheDirectory|$wgFileCacheDirectory}}</code></>.</translate>
Set to <tvar|true><code>true</code></> to activate server-side file caching.</translate>
<translate><!--T:9--> You must create the directory yourself though.</translate>
<translate>
This will cache static pages for non-logged-in users to reduce database traffic on public sites.


Must set <tvar|code><code>{{ll|Manual:$wgShowIPinHeader|$wgShowIPinHeader}} = false;</code></>.</translate>
<translate><!--T:11--> If <code>$wgUseFileCache</code> is set to <tvar|true><code>true</code></>, <tvar|DebugToolbar><code>{{ll|Manual:$wgDebugToolbar|$wgDebugToolbar}}</code></> will automatically be set to <tvar|false><code>false</code></>.</translate>
<translate><!--T:7--> (Part of that automatically done after <tvar|rev>{{rev|46374}}</>.)</translate>
<translate>
(Done automatically after <tvar|rev>[[Special:Code/MediaWiki/46374|r46374]]</>.)


Specify where you want the cache files to go in your server filesystem using <tvar|FileCacheDirectory><code>{{ll|Manual:$wgFileCacheDirectory|$wgFileCacheDirectory}}</code></>.</translate>
<translate>
<translate>
== See also == <!--T:12-->
You must create the directory yourself though.

See also [[<tvar|cache>Special:MyLanguage/Manual:File cache</>|Manual:File cache]].
</translate>
</translate>
* {{ll|Manual:$wgFileCacheDirectory}}
* {{ll|Manual:File cache}}


[[Category:Cache variables{{translation}}|UseFileCache]]
[[Category:Cache variables{{#translation:}}|UseFileCache]]

Latest revision as of 11:34, 28 January 2022

File Cache: $wgUseFileCache
Create static HTML pages for unregistered viewers to reduce database traffic.
Introduced in version:Before 1.1.0
Removed in version:Still in use
Allowed values:(boolean)
Default value:false

Details

[edit]

Set to true to activate the server-side file cache. The cache consists of static HTML pages that are served to unregistered viewers to reduce database traffic.

The HTML pages will be created in the directory specified by $wgFileCacheDirectory . You must create the directory yourself though.

If $wgUseFileCache is set to true, $wgDebugToolbar will automatically be set to false. (Part of that automatically done after r46374.)

See also

[edit]