Storage on CDB files. 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 | |
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 650 of file MessageIndex.php.
|
protected |
Looks up the stored value for single key.
Only for testing.
string | $key |
Reimplemented from MessageIndex.
Definition at line 689 of file MessageIndex.php.
CDBMessageIndex::getKeys | ( | ) |
Reimplemented from MessageIndex.
Definition at line 677 of file MessageIndex.php.
|
protected |
Definition at line 716 of file MessageIndex.php.
CDBMessageIndex::retrieve | ( | bool | $readLatest = false | ) |
bool | $readLatest |
Reimplemented from MessageIndex.
Definition at line 662 of file MessageIndex.php.
|
protected |
Reimplemented from MessageIndex.
Definition at line 700 of file MessageIndex.php.
|
protected |
Definition at line 656 of file MessageIndex.php.
|
protected |
Definition at line 652 of file MessageIndex.php.
|
protected |
Definition at line 654 of file MessageIndex.php.