$smwgValueLookupFeatures

From semantic-mediawiki.org


Configuration parameter details:
Name $smwgValueLookupFeatures
Description Sets which value lookup features should be served from value lookup cache
Default setting See below
Software Semantic MediaWiki
Since version
Until version still available
Configuration Cache · Experimental
Keyword caching · object cache · performance · query performance · query lookup cache · query lookup · experimental


$smwgValueLookupFeatures is a configuration parameter that sets which value lookup features should be served from value lookup cache to allow for a more fine grained tuning depending on the size available for the cache of the different "ValueLookupStore" interfaces. The configuration parameter 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]

$smwgValueLookupFeatures => SMW_VL_SD | SMW_VL_PL | SMW_VL_PV | SMW_VL_PS;

This means that the value lookup is always done from the defined value lookup cache backend for all features.

Available options[edit]

  • SMW_VL_SD – corresponds to "Store::getSemanticData"
  • SMW_VL_PL – corresponds to "Store::getProperties"
  • SMW_VL_PV – corresponds to "Store::getPropertyValues"
  • SMW_VL_PS – corresponds to "Store::getPropertySubjects" (mainly involved when generating queries)

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:

Removing the "getSemanticData" feature
$smwgValueLookupFeatures = SMW_VL_PL | SMW_VL_PV | SMW_VL_PS;

or alternatively remove the feature flag from the existing definition of the configuration parameter like e.g.

$smwgValueLookupFeatures = ( $smwgValueLookupFeatures & ~SMW_VL_SD );
NoteNote: Please use parentheses4 when combining different bit-operations to avoid a possible mismatch.
This is the recommended setting for wikis with a high editing activity.
Disable all value lookup features
$smwgValueLookupFeatures = 0;
If a feature is disabled then a connection is always established to the standard data store/backend.

See also[edit]

Caching in general

References

  1. ^  Semantic MediaWiki: GitHub issue gh:smw:1116
  2. ^  Semantic MediaWiki: GitHub pull request gh:smw:3808
  3. ^  Semantic MediaWiki: GitHub issue gh:smw:3722
  4. ^  Bitwise Operators to use parentheses to ensure the desired precedence ...