$smwgQueryResultCacheLifetime
Configuration parameter details: | |
Name | $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 |
Since version | |
Until version | still available |
Configuration | Cache · Experimental |
Keyword | caching · object cache · performance · query performance · query result cache · experimental |
$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
Default setting[edit]
$smwgQueryResultCacheLifetime = 60 * 60 * 24 * 7;
This means that by default lifetime of the query result cache is one week.
Changing the default setting[edit]
To modify the setting to this configuration parameter, add one of the following lines to your "LocalSettings.php" file after the enableSemantics()
call:
- Disable forced query result updates
$smwgQueryResultCacheLifetime = 0;
This means that a query result is kept until it is being evicted2 by another trigger. See the help page on query result caching for further information.
- Shorten the cache lifetime to a day
$smwgQueryResultCacheLifetime = 60 * 60 * 24;
This means that a query result is kept for a day until it is being evicted2.
- Extend the cache lifetime to a month
$smwgQueryResultCacheLifetime = 60 * 60 * 24 * 30;
This means that a query result is kept for a month until it is being evicted2.
See also[edit]
- Query result caching
- Help page on the query result cache
- Help page on configuration parameter
$smwgQueryResultCacheType
Sets whether the query result cache may be used - Help page on configuration parameter
$smwgQueryResultNonEmbeddedCacheLifetime
Sets the cache lifetime of non-embedded queries and their results fetched from the query engine - Help page on configuration parameter
$smwgQueryResultCacheRefreshOnPurge
Sets whether it is possible to manually refresh the query cache by doing a "purge" action
- Embedded query updates
- Help page on embedded query updates
- Help page on configuration parameter
$smwgEnabledQueryDependencyLinksStore
Sets whether tracking and storing of dependencies of embedded queries may be used
References
- ^ Semantic MediaWiki: GitHub pull request gh:smw:1251
- a b c Chapter 4. Cache Eviction being described as " ... the process by which old, relatively unused, or excessively voluminous data can be dropped from the cache ..."