Storage on serialized file. More...
Public Member Functions | |
retrieve (bool $readLatest=false) | |
![]() | |
getKeys () | |
rebuild (float $timestamp=null) | |
Creates the index from scratch. | |
getStatusCacheKey () | |
storeInterim (MessageGroup $group, array $newKeys) | |
Protected Member Functions | |
store (array $array, array $diff) | |
![]() | |
get ( $key) | |
Looks up the stored value for single key. | |
lock () | |
unlock () | |
clearMessageGroupStats (array $diff) | |
Purge stuff when set of keys have changed. | |
checkAndAdd (&$hugearray, MessageGroup $g, $ignore=false) | |
serialize ( $data) | |
These are probably slower than serialize and unserialize, but they are more space efficient because we only need strings and arrays. | |
unserialize ( $data) | |
Protected Attributes | |
$index | |
$filename = 'translate_messageindex.ser' | |
![]() | |
$interimCache | |
Additional Inherited Members | |
![]() | |
static | singleton () |
static | setInstance (self $instance) |
Override the global instance, for testing. | |
static | getGroupIds (MessageHandle $handle) |
Retrieves a list of groups given MessageHandle belongs to. | |
static | getPrimaryGroupId (MessageHandle $handle) |
static | getArrayDiff (array $old, array $new) |
Compares two associative arrays. | |
![]() | |
static | $instance |
Storage on serialized file.
This serializes the whole array. Because this format can preserve the values which are stored as references inside the array, this is the most space efficient storage method and fastest when you want the full index.
Unfortunately when the size of index grows to about 50000 items, even though it is only 3,5M on disk, it takes 35M when loaded into memory and the loading can take more than 0,5 seconds. Because usually we need to look up only few keys, it is better to use another backend which provides random access - this backend doesn't support that.
Definition at line 460 of file MessageIndex.php.
SerializedMessageIndex::retrieve | ( | bool | $readLatest = false | ) |
Reimplemented from MessageIndex.
Definition at line 465 of file MessageIndex.php.
|
protected |
Reimplemented from MessageIndex.
Definition at line 480 of file MessageIndex.php.
|
protected |
Definition at line 463 of file MessageIndex.php.
|
protected |
Definition at line 462 of file MessageIndex.php.