$smwgQueryResultNonEmbeddedCacheLifetime
From semantic-mediawiki.org
Configuration parameter details: | |
Name | $smwgQueryResultNonEmbeddedCacheLifetime |
Description | Sets the cache lifetime of non-embedded queries and their results fetched from the query engine |
Default setting | 60 * 10 |
Software | Semantic MediaWiki |
Since version | |
Until version | still available |
Configuration | Cache |
Keyword | caching · object cache · performance · query performance · query result cache · browsing interface · experimental |
$smwgQueryResultNonEmbeddedCacheLifetime
is a configuration parameter that sets the cache lifetime of non-embedded queries and their results, e.g. browsing interfaces such as special page "Ask"Provides an interface that assists users with creating and executing semantic queries, etc. or from API modules 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..12
Settings to this configuration parameter only take effect if the query results cache was enabled.
This configuration parameter can also be used to minimize a possible denial-of-service attacks by preventing an advisory to make unlimited query requests from either special page "Ask"Provides an interface that assists users with creating and executing semantic queries or the API modules that may lock the database due to complex query answering and instead being rerouted to the cache once a result has been computed.
Non-embedded queries cannot not be tracked using embedded query updates since the subject is being missing that would identify the entity. Therefore an auto-purge mechanism as in case of an embedded entity is not possible hence the lifetime should be carefully selected to provide the necessary means for a user and the application.
Default setting[edit]
$smwgQueryResultNonEmbeddedCacheLifetime = 60 * 10;
This means that by default lifetime of the query result cache is ten minutes.
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 the caching for non-embedded queries
$smwgQueryResultNonEmbeddedCacheLifetime = 0;
or
$smwgQueryResultNonEmbeddedCacheLifetime = false;
- Extend the cache lifetime to an hour
$smwgQueryResultNonEmbeddedCacheLifetime = 60 * 60;
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
$smwgQueryResultCacheLifetime
Sets the cache lifetime of 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
- Other
- Help page on browsing interfaces
- Help page on the API modules
References
- ^ Semantic MediaWiki: GitHub pull request gh:smw:1251
- ^ | Semantic MediaWiki: GitHub pull request gh:smw:2096