MediaWiki
REL1_24
|
A localisation cache optimised for loading large amounts of data for many languages. More...
Public Member Functions | |
getItem ($code, $key) | |
getSubitem ($code, $key, $subkey) | |
recache ($code) | |
unload ($code) | |
Protected Member Functions | |
readPHPFile ($fileName, $fileType) | |
trimCache () | |
Unload cached languages until there are less than $this->maxLoadedLangs. | |
Private Attributes | |
$fileCache = array() | |
A cache of the contents of data files. | |
$maxLoadedLangs = 10 | |
Maximum number of languages that may be loaded into $this->data. | |
$mruLangs = array() | |
Most recently used languages. |
A localisation cache optimised for loading large amounts of data for many languages.
Used by rebuildLocalisationCache.php.
Definition at line 1354 of file LocalisationCache.php.
LocalisationCacheBulkLoad::getItem | ( | $ | code, |
$ | key | ||
) |
string | $code | |
string | $key |
Reimplemented from LocalisationCache.
Definition at line 1404 of file LocalisationCache.php.
LocalisationCacheBulkLoad::getSubitem | ( | $ | code, |
$ | key, | ||
$ | subkey | ||
) |
string | $code | |
string | $key | |
string | $subkey |
Reimplemented from LocalisationCache.
Definition at line 1417 of file LocalisationCache.php.
LocalisationCacheBulkLoad::readPHPFile | ( | $ | fileName, |
$ | fileType | ||
) | [protected] |
string | $fileName | |
string | $fileType |
Reimplemented from LocalisationCache.
Definition at line 1378 of file LocalisationCache.php.
References LocalisationCache\$data.
LocalisationCacheBulkLoad::recache | ( | $ | code | ) |
string | $code |
Reimplemented from LocalisationCache.
Definition at line 1427 of file LocalisationCache.php.
LocalisationCacheBulkLoad::trimCache | ( | ) | [protected] |
Unload cached languages until there are less than $this->maxLoadedLangs.
Definition at line 1445 of file LocalisationCache.php.
LocalisationCacheBulkLoad::unload | ( | $ | code | ) |
string | $code |
Reimplemented from LocalisationCache.
Definition at line 1437 of file LocalisationCache.php.
LocalisationCacheBulkLoad::$fileCache = array() [private] |
A cache of the contents of data files.
Core files are serialized to avoid using ~1GB of RAM during a recache.
Definition at line 1359 of file LocalisationCache.php.
LocalisationCacheBulkLoad::$maxLoadedLangs = 10 [private] |
Maximum number of languages that may be loaded into $this->data.
Definition at line 1371 of file LocalisationCache.php.
LocalisationCacheBulkLoad::$mruLangs = array() [private] |
Most recently used languages.
Uses the linked-list aspect of PHP hashtables to keep the most recently used language codes at the end of the array, and the language codes that are ready to be deleted at the beginning.
Definition at line 1366 of file LocalisationCache.php.