Příručka:$wgParserCacheType
Mezipaměť analyzátoru: $wgParserCacheType | |
---|---|
Nastavení mezipaměti analyzátoru |
|
Zavedeno od verze: | 1.5.0 |
Odstraněno od verze: | stále se používá |
Povolené hodnoty: | (Jedna z konstant mezipaměti) viz níže |
Výchozí hodnota: | CACHE_ANYTHING |
Další nastavení: Podle abecedy | Podle funkce |
Podrobnosti
The cache type for storing page content HTML (e.g. parsed from wikitext).
Parsing wikitext is considered an expensive operation. It is recommended to give your parser cache plenty of storage space, such that long tail cache hits are possible.
The default parser cache backend (when MainCacheType is left to CACHE_NONE) is effectively CACHE_DB (SqlBagOStuff). If you set up a main cache type such as memcached, it is recommended to set this explicitly to CACHE_DB.
Zde jsou dostupné konstanty mezipaměti, jak jsou definovány v Defines.php
CACHE_ANYTHING
- Používejte cokoliv, pokud to fungujeCACHE_NONE
- Neukládat do mezipamětiCACHE_DB
- Ukládejte objekty mezipaměti v DBCACHE_MEMCACHED
- memcached, musí specifikovat servery v Příručka:$wgMemCachedServersCACHE_ACCEL
- APC nebo WinCache, podle toho, co je k dispozici, v tomto pořadí. Určeno funkcí "ObjectCache::newAccelerator".
Poznámka
Advice for large wiki farms:
- Consider allocating a dedicated database to ParserCache. Register it in $wgObjectCaches and point $wgParserCacheType to it.
- Consider using MultiWriteBagOStuff to add a higher tier with Memcached in front of the lower database tier.
- Consider setting
'purgePeriod' => 0
in the dedicated SqlBagOStuff entry in $wgObjectCaches. This disables the automatic purging of expired rows (which would normally happen in the background of write requests). You can then schedule the purgeParserCache.php script to e.g. once a day prune expired rows from the a dedicated maintenance server.
Související odkazy
- Manual:Caching
- $wgEnableParserCache (odstraněno od 1.33)