Con­figu­ration para­meter "$smwgValueLookupCacheLifetime"

From semantic-mediawiki.org
Configuration parameter details:
Name $smwgValueLookupCacheLifetime
Description Sets the cache lifetime of the value lookup cache until it is being invalidated
Default setting
60 * 60 * 24 * 7
Software Semantic MediaWiki
Since version
Until version still available
Configuration Cache
Keyword caching · object cache · performance · query performance · query lookup cache · query lookup · experimental

$smwgValueLookupCacheLifetime is a configuration parameter that sets the cache lifetime of the value lookup cache ("smwgValueLookupCacheType") until it is being invalidated in case this has not happened earlier. It was introduced in Semantic MediaWiki 2.3.0Released on 29 October 2015 and compatible with MW 1.19.0 - 1.25.x..1

This configuration parameter only takes effect if the value lookup cache was enabled.

Default setting

$smwgValueLookupCacheLifetime = 60 * 60 * 24 * 7;

This means that by default the lifetime of the value lookup cache is one week until an item is being replaced in case this has not happened earlier.

Changing the default setting

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

Disable forced cache updates
$smwgValueLookupCacheLifetime = 0;

This means that an item is kept until it is being replaced, flushed, or dropped.

Shorten the cache lifetime to a day
$smwgValueLookupCacheLifetime = 60 * 60 * 24;

This means that an item is kept for a maximum of one day.

Extend the cache lifetime to a month
$smwgValueLookupCacheLifetime = 60 * 60 * 24 * 30;

This means that an item is kept for a maximum of one month.

See also

Caching in general

References

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