Parser cache
Appearance
Our implementation of the MediaWiki parser cache primarily uses MariaDB, with hot keys also residing inMemcached.
The configuration is in CommonSettings.php (operations/mediawiki-config ) as part of a MultiWrite wgObjectCaches
key. Although the mapping between parser cache sections and DB hosts used to be configured in mediawiki-config as well, this is now managed with dbctl.
-
ParserCache in Memcached (tier 1 and tier 2).
-
ParserCache DB (tier 3). MediaWiki uses consistent hashing to distribute entries over the pc1, pc2, and pc3 sections.
Current configuration
- Cache retention period is set to (as of 2021-06-07 - see T282761):
- 21 days for wiki pages
- 10 days for talk pages
- Semi-random tasks from 2021 containing various current knowledge about parser cache: T282761.
- Grafana: Parser Cache
- Each data center has its own parser cache; since multi-DC MediaWiki, it is possible for eqiad and codfw to consistently respond with different parser cache contents (can be tested with WikimediaDebug). A purge appears to correctly purge the parser cache in both data centers. Lucas Werkmeister (WMDE) (talk) 14:11, 13 October 2023 (UTC)
History
Prior to 2011, the parser cache was solely memcached-based.
In 2011, we introduced the MySQL-based parser cache. See Parser cache expansion and Disk-backed object cache for details of the 2011 project.
In 2020, an additional local on-host Memcached tier was enabled for parser cache (T264604).