Help:Configuration parameter "$smwgQueryResultCacheLifetime"

From semantic-mediawiki.org
Jump to: navigation, search
edit with form


Title $smwgQueryResultCacheLifetime
Description Sets the cache lifetime of embedded queries and their results fetched from the query engine
Default setting
60 * 60 * 24 * 7
Software Semantic MediaWiki
First version supported
Last version supported still available
Configuration Cache
Keyword caching · performance · query performance

$smwgQueryResultCacheLifetime is a configuration parameter that sets the cache lifetime of embedded queries and their results fetched from the query engine. It was introduced in Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x..1

This configuration parameter only takes effect if the query results cache was enabled.

Default setting

$smwgQueryResultCacheLifetime = 60 * 60 * 24 * 7;

This means that by default lifetime of the query result cache is one week.

Changing the default setting

To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Shorten the cache lifetime to a day
$smwgQueryResultCacheLifetime = 60 * 60 * 24;
Extend the cache lifetime to a month
$smwgQueryResultCacheType = 60 * 60 * 24 * 30;

See also

References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:1251