Help:Query cache

adds an experimental feature to support a simple query cacheCiteRef::gh:smw:1251 with the objective to minimize the computational effort for queries that share the same query signature. A query signature is a fingerprint that identifies each query on characteristics that influences (e.g. condition, limit, offset, and sort/order) the result set of a query. This experimental feature is disabled by default.

Usage
The simple query cache is used for:
 * Queries that have the same signature will be redirected to the cache instead of seeking an active "QueryEngine" connection and hereby reduce DB connections and computation effort
 * Only the subject list is being cached as result of the query answering, leaving individual "PrintRequest's" to the distinctive printer and avoids conflict with existing or future "ResultPrinter" when generating the output representation

When the query result cache is enabled, current queries will be reassigned a new query ID CiteRef::gh:smw:2099CiteRef::gh:smw:2176 to increase the pool of queries that share potentially the same signature and hereby broaden the range of a cache reuse and minimize cache fragmentation.

The evictionCiteRef::docs.jboss.org:cacheeviction of a cache is normally triggered by:
 * A time constraint (see })
 * A manually intervention (see ), or
 * An embedded query update (see ) if enabled with any monitored change to a dependency chain to trigger an automatic purge of related queries

A recommended cache provider is CiteRef::infoworld.com:3063161 to account for an optimal response time, storage capacity, and independence from the DB master. The cache statistics with its relative small size will be stored using  to improve durability of the collected data and make it independent of the query cache operations.

Operational relevance and statistics
To make a decision about whether the query result cache bears some operational relevance (meaning the benefits outweigh the cost of keeping an additional cache instance, or the median response time proves some generalisable advantage) with cache statistics being kept for the duration of the query cache lifetime, allowing it to gather some data about performance and use.


 * Example

Configuration parameters

 * − Allows to enable the feature
 * − Allows to set the lifetime of embedded queries and their results
 * − Allows to set the lifetime of non-embedded queries and their results
 * − Allows to control the option to manually refresh embedded queries and their results