Storage on CDB files. More...
Public Member Functions | |
retrieve (bool $readLatest=false) | |
getKeys () | |
Public Member Functions inherited from MessageIndex | |
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 () | |
Protected Member Functions inherited from MessageIndex | |
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' | |
Protected Attributes inherited from MessageIndex | |
$interimCache | |
Additional Inherited Members | |
Static Public Member Functions inherited from MessageIndex | |
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 Protected Attributes inherited from MessageIndex | |
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 659 of file MessageIndex.php.
|
protected |
Looks up the stored value for single key.
Only for testing.
string | $key |
Reimplemented from MessageIndex.
Definition at line 698 of file MessageIndex.php.
CDBMessageIndex::getKeys | ( | ) |
Reimplemented from MessageIndex.
Definition at line 686 of file MessageIndex.php.
|
protected |
Definition at line 731 of file MessageIndex.php.
CDBMessageIndex::retrieve | ( | bool | $readLatest = false | ) |
bool | $readLatest |
Reimplemented from MessageIndex.
Definition at line 671 of file MessageIndex.php.
|
protected |
Reimplemented from MessageIndex.
Definition at line 715 of file MessageIndex.php.
|
protected |
Definition at line 665 of file MessageIndex.php.
|
protected |
Definition at line 661 of file MessageIndex.php.
|
protected |
Definition at line 663 of file MessageIndex.php.