MediaWiki  REL1_19
LocalisationCache_BulkLoad Class Reference

A localisation cache optimised for loading large amounts of data for many languages. More...

Inheritance diagram for LocalisationCache_BulkLoad:
Collaboration diagram for LocalisationCache_BulkLoad:

List of all members.

Public Member Functions

 getItem ($code, $key)
 getSubitem ($code, $key, $subkey)
 recache ($code)
 unload ($code)

Public 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.

Protected Member Functions

 readPHPFile ($fileName, $fileType)
 trimCache ()
 Unload cached languages until there are less than $this->maxLoadedLangs.

Detailed Description

A localisation cache optimised for loading large amounts of data for many languages.

Used by rebuildLocalisationCache.php.

Definition at line 1070 of file LocalisationCache.php.


Member Function Documentation

LocalisationCache_BulkLoad::getItem ( code,
key 
)
Parameters:
$code
$key
Returns:
mixed

Reimplemented from LocalisationCache.

Definition at line 1120 of file LocalisationCache.php.

LocalisationCache_BulkLoad::getSubitem ( code,
key,
subkey 
)
Parameters:
$code
$key
$subkey
Returns:

Reimplemented from LocalisationCache.

Definition at line 1132 of file LocalisationCache.php.

LocalisationCache_BulkLoad::readPHPFile ( fileName,
fileType 
) [protected]
Parameters:
$fileName
$fileType
Returns:
array|mixed

Reimplemented from LocalisationCache.

Definition at line 1094 of file LocalisationCache.php.

References LocalisationCache\$data.

Parameters:
$code

Reimplemented from LocalisationCache.

Definition at line 1141 of file LocalisationCache.php.

References trimCache().

Here is the call graph for this function:

Unload cached languages until there are less than $this->maxLoadedLangs.

Definition at line 1159 of file LocalisationCache.php.

References unload(), and wfDebug().

Referenced by recache().

Here is the call graph for this function:

Here is the caller graph for this function:

Parameters:
$code

Reimplemented from LocalisationCache.

Definition at line 1151 of file LocalisationCache.php.

Referenced by trimCache().

Here is the caller graph for this function:


Member Data Documentation

LocalisationCache_BulkLoad::$fileCache = array()

A cache of the contents of data files.

Core files are serialized to avoid using ~1GB of RAM during a recache.

Definition at line 1075 of file LocalisationCache.php.

LocalisationCache_BulkLoad::$maxLoadedLangs = 10

Maximum number of languages that may be loaded into $this->data.

Definition at line 1087 of file LocalisationCache.php.

LocalisationCache_BulkLoad::$mruLangs = array()

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 1082 of file LocalisationCache.php.


The documentation for this class was generated from the following file: