Storage on CDB files. More...
Public Member Functions | |
retrieve ( $forRebuild=false) | |
getKeys () | |
![]() | |
rebuild (float $timestamp=null) | |
Creates the index from scratch. | |
getStatusCacheKey () | |
storeInterim (MessageGroup $group, array $newKeys) | |
Protected Member Functions | |
get ( $key) | |
Looks up the stored value for single key. | |
store (array $array, array $diff) | |
getReader () | |
![]() | |
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 | |
$reader | |
$filename = 'translate_messageindex.cdb' | |
![]() | |
$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 CDB files.
This is improved version of SerializedMessageIndex. It uses CDB files for storage, which means it provides random access. The CDB files are about double the size of serialized files (~7M for 50000 keys).
Loading the whole index is slower than serialized, but about the same as for database. Suitable for single-server setups where SerializedMessageIndex is too slow for loading the whole index.
Definition at line 671 of file MessageIndex.php.
|
protected |
Looks up the stored value for single key.
Only for testing.
string | $key |
Reimplemented from MessageIndex.
Definition at line 712 of file MessageIndex.php.
CDBMessageIndex::getKeys | ( | ) |
Reimplemented from MessageIndex.
Definition at line 698 of file MessageIndex.php.
|
protected |
Definition at line 745 of file MessageIndex.php.
CDBMessageIndex::retrieve | ( | $forRebuild = false | ) |
bool | $forRebuild |
Reimplemented from MessageIndex.
Definition at line 683 of file MessageIndex.php.
|
protected |
Reimplemented from MessageIndex.
Definition at line 729 of file MessageIndex.php.
|
protected |
Definition at line 677 of file MessageIndex.php.
|
protected |
Definition at line 673 of file MessageIndex.php.
|
protected |
Definition at line 675 of file MessageIndex.php.