$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 and removed in Semantic MediaWiki 3.0.2Released on 11 April 2019 and compatible with MW 1.27.0 - 1.31.x.2 since it has not shown the expected improvements. Instead the internal prefetch lookup feature will be used.3

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

Default setting[edit]

$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[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 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[edit]

Caching in general

References

  1. ^  Semantic MediaWiki: GitHub pull request gh:smw:1035
  2. ^  Semantic MediaWiki: GitHub pull request gh:smw:3808
  3. ^  Semantic MediaWiki: GitHub issue gh:smw:3722