Help:Configuration parameter "$smwgQueryResultCacheLifetime"

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


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 2.5.0
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.0.1

NoteNote: This setting 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