MediaWiki  REL1_19
LCStore_CDB Class Reference

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

Inheritance diagram for LCStore_CDB:
Collaboration diagram for LCStore_CDB:

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.

Public Attributes

 $currentLang
 $directory
 $readers
 $writer

Protected Member Functions

 getFileName ($code)

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 977 of file LocalisationCache.php.


Constructor & Destructor Documentation

LCStore_CDB::__construct ( conf = array())

Definition at line 980 of file LocalisationCache.php.

References $wgCacheDirectory.


Member Function Documentation

Finish a write transaction.

Implements LCStore.

Definition at line 1030 of file LocalisationCache.php.

LCStore_CDB::get ( code,
key 
)

Get a value.

Parameters:
$codeLanguage code
$keyCache key

Implements LCStore.

Definition at line 990 of file LocalisationCache.php.

References getFileName(), and CdbReader\open().

Here is the call graph for this function:

LCStore_CDB::getFileName ( code) [protected]

Definition at line 1045 of file LocalisationCache.php.

Referenced by get(), and startWrite().

Here is the caller graph for this function:

LCStore_CDB::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:
$key
$value

Implements LCStore.

Definition at line 1038 of file LocalisationCache.php.

Start a write transaction.

Parameters:
$codeLanguage code

Implements LCStore.

Definition at line 1013 of file LocalisationCache.php.

References getFileName(), CdbWriter\open(), and wfMkdirParents().

Here is the call graph for this function:


Member Data Documentation

LCStore_CDB::$currentLang

Definition at line 978 of file LocalisationCache.php.

LCStore_CDB::$directory

Definition at line 978 of file LocalisationCache.php.

LCStore_CDB::$readers

Definition at line 978 of file LocalisationCache.php.

LCStore_CDB::$writer

Definition at line 978 of file LocalisationCache.php.


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