Help:Caching

From semantic-mediawiki.org
Jump to: navigation, search

Cache (or caching) is specified as an storage mechanism were earlier computed values are stored separately from the original request and hereby enable future requests to be served faster using the already computed results.

The general suggestions (where feasible) is to use redis1234 as cache backend to ensure that large blob objects can be stored and retrieved without impacting the general performance.

Technical aspects

The PageUpdater controls three caches:

  1. HtmlCache
  2. WebCache (eg. Squid)
  3. ParserCache

Preliminary notes

Cache settings

Caching (either temporary or persistent) is an important part of MediaWiki's storage strategy and also became an infrastructural component in recent Semantic MediaWiki releases to ensure that editing and viewing experience is improved. It further helps to reduce the amount of computational tasks performed required by Semantic MediaWiki.

An expensive (and memory intensive) task is MediaWiki's Parser::parse with responsibility to turn wikitext into a HTML representation. It also includes processing (or signalling) extension to add or modify data before the output process is finalized.

mws: Manual:$wgParserCacheType‎ to keep parsed pages in a cache to speed up output of the same page viewed by another user with the same options

Related

See also

Note

Please be aware that this page is being used as reference in MediaWiki:Smw-sp-properties-cache-info.

References

  1. ^  Why Redis beats Memcached for caching "... Memcached and Redis serve as in-memory, key-value data stores ... Redis gives you much greater flexibility regarding the objects you can cache. While Memcached limits key names to 250 bytes and works with plain strings only, Redis allows key names and values to be as large as 512MB ..."
  2. ^  How fast is Redis?
  3. ^  Clarifications about Redis and Memcached
  4. ^  The issue with APCu is that it will store its cache in the PHP shared memory and means that different PHP processes share the available memory. See also Additional notes for Redis vs. APCu on Memory Caching