Inherits LCStore.
Public Member Functions | |
__construct ($conf=array()) | |
get ($code, $key) | |
Get a value. | |
startWrite ($code) | |
Start a write transaction. | |
finishWrite () | |
Finish a write transaction. | |
set ($key, $value) | |
Set a key to a given value. | |
Public Attributes | |
$readers | |
$writer | |
$currentLang | |
$directory | |
Protected Member Functions | |
getFileName ($code) |
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 840 of file LocalisationCache.php.
LCStore_CDB::__construct | ( | $ | conf = array() |
) |
LCStore_CDB::finishWrite | ( | ) |
Finish a write transaction.
Implements LCStore.
Definition at line 887 of file LocalisationCache.php.
LCStore_CDB::get | ( | $ | code, | |
$ | key | |||
) |
Get a value.
$code | Language code | |
$key | Cache key |
Implements LCStore.
Definition at line 852 of file LocalisationCache.php.
References $code, getFileName(), and CdbReader::open().
LCStore_CDB::getFileName | ( | $ | code | ) | [protected] |
Definition at line 902 of file LocalisationCache.php.
References $code.
Referenced by get(), and startWrite().
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.
Implements LCStore.
Definition at line 895 of file LocalisationCache.php.
LCStore_CDB::startWrite | ( | $ | code | ) |
Start a write transaction.
$code | Language code |
Implements LCStore.
Definition at line 872 of file LocalisationCache.php.
References $code, getFileName(), CdbWriter::open(), and wfMkdirParents().
LCStore_CDB::$currentLang |
Definition at line 841 of file LocalisationCache.php.
LCStore_CDB::$directory |
Definition at line 841 of file LocalisationCache.php.
LCStore_CDB::$readers |
Definition at line 841 of file LocalisationCache.php.
LCStore_CDB::$writer |
Definition at line 841 of file LocalisationCache.php.