MediaWiki  REL1_24
LCStoreCDB Class Reference

LCStore implementation which stores data as a collection of CDB files in the directory given by $wgCacheDirectory. More...

Inheritance diagram for LCStoreCDB:
Collaboration diagram for LCStoreCDB:

List of all members.

Public Member Functions

 __construct ($conf=array())
 finishWrite ()
 Finish a write transaction.
 get ($code, $key)
 Get a value.
 set ($key, $value)
 Set a key to a given value.
 startWrite ($code)
 Start a write transaction.

Protected Member Functions

 getFileName ($code)

Private Attributes

string $currentLang
 Current language code *.
bool string $directory
 Cache directory.
CdbReader[] $readers
 *
CdbWriter $writer
 *

Detailed Description

LCStore implementation which stores data as a collection of CDB files in the directory given by $wgCacheDirectory.

If $wgCacheDirectory is not set, this will throw an exception.

Profiling indicates that on Linux, this implementation outperforms MySQL if the directory is on a local filesystem and there is ample kernel cache space. The performance advantage is greater when the DBA extension is available than it is with the PHP port.

See Cdb.php and http://cr.yp.to/cdb.html

Definition at line 1228 of file LocalisationCache.php.


Constructor & Destructor Documentation

LCStoreCDB::__construct ( conf = array())

Definition at line 1237 of file LocalisationCache.php.

References global.


Member Function Documentation

Finish a write transaction.

Implements LCStore.

Definition at line 1300 of file LocalisationCache.php.

LCStoreCDB::get ( code,
key 
)

Get a value.

Parameters:
string$codeLanguage code
string$keyCache key

Implements LCStore.

Definition at line 1247 of file LocalisationCache.php.

References directory.

LCStoreCDB::getFileName ( code) [protected]

Definition at line 1323 of file LocalisationCache.php.

References $value, and writer.

LCStoreCDB::set ( key,
value 
)

Set a key to a given value.

startWrite() must be called before this is called, and finishWrite() must be called afterwards.

Parameters:
string$key
mixed$value

Implements LCStore.

Definition at line 1312 of file LocalisationCache.php.

Start a write transaction.

Parameters:
string$codeLanguage code

Implements LCStore.

Definition at line 1279 of file LocalisationCache.php.


Member Data Documentation

string LCStoreCDB::$currentLang [private]

Current language code *.

Definition at line 1233 of file LocalisationCache.php.

bool string LCStoreCDB::$directory [private]

Cache directory.

False if not set *

Definition at line 1235 of file LocalisationCache.php.

CdbReader [] LCStoreCDB::$readers [private]

*

Definition at line 1229 of file LocalisationCache.php.

CdbWriter LCStoreCDB::$writer [private]

*

Definition at line 1231 of file LocalisationCache.php.


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