Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\MessageLoading\CDBMessageIndex Class Reference

Storage on CDB files. More...

Inheritance diagram for MediaWiki\Extension\Translate\MessageLoading\CDBMessageIndex:
MediaWiki\Extension\Translate\MessageLoading\MessageIndexStore

Public Member Functions

 retrieve (bool $readLatest=false)
 
 getKeys ()
 
 get (string $key)
 @inheritDoc
 
 store (array $array, array $diff)
 @inheritDoc
 

Additional Inherited Members

- Protected Member Functions inherited from MediaWiki\Extension\Translate\MessageLoading\MessageIndexStore
 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)
 

Detailed Description

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 21 of file CDBMessageIndex.php.

Member Function Documentation

◆ get()

MediaWiki\Extension\Translate\MessageLoading\CDBMessageIndex::get ( string $key)

@inheritDoc

Reimplemented from MediaWiki\Extension\Translate\MessageLoading\MessageIndexStore.

Definition at line 53 of file CDBMessageIndex.php.

◆ getKeys()

MediaWiki\Extension\Translate\MessageLoading\CDBMessageIndex::getKeys ( )
Returns
string[]

Reimplemented from MediaWiki\Extension\Translate\MessageLoading\MessageIndexStore.

Definition at line 40 of file CDBMessageIndex.php.

◆ retrieve()

MediaWiki\Extension\Translate\MessageLoading\CDBMessageIndex::retrieve ( bool $readLatest = false)

◆ store()

MediaWiki\Extension\Translate\MessageLoading\CDBMessageIndex::store ( array $array,
array $diff )

@inheritDoc

Reimplemented from MediaWiki\Extension\Translate\MessageLoading\MessageIndexStore.

Definition at line 65 of file CDBMessageIndex.php.


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