MediaWiki
1.23.5
|
LCStore implementation which stores data as a collection of CDB files in the directory given by $wgCacheDirectory. More...
Public Member Functions | |
__construct ( $conf=array()) | |
finishWrite () | |
Finish a write transaction. More... | |
get ( $code, $key) | |
Get a value. More... | |
set ( $key, $value) | |
Set a key to a given value. More... | |
startWrite ( $code) | |
Start a write transaction. More... | |
Protected Member Functions | |
getFileName ( $code) | |
Private Attributes | |
string | $currentLang |
Current language code *. More... | |
bool string | $directory |
Cache directory. More... | |
CdbReader[] | $readers |
CdbWriter | $writer |
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 1245 of file LocalisationCache.php.
LCStoreCDB::__construct | ( | $conf = array() | ) |
Definition at line 1254 of file LocalisationCache.php.
LCStoreCDB::finishWrite | ( | ) |
Finish a write transaction.
Implements LCStore.
Definition at line 1317 of file LocalisationCache.php.
LCStoreCDB::get | ( | $code, | |
$key | |||
) |
Get a value.
string | $code | Language code |
string | $key | Cache key |
Implements LCStore.
Definition at line 1264 of file LocalisationCache.php.
References $e, $value, getFileName(), CdbReader\open(), and wfDebug().
|
protected |
Definition at line 1340 of file LocalisationCache.php.
Referenced by get(), and startWrite().
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.
string | $key | |
mixed | $value |
Implements LCStore.
Definition at line 1329 of file LocalisationCache.php.
LCStoreCDB::startWrite | ( | $code | ) |
Start a write transaction.
string | $code | Language code |
Implements LCStore.
Definition at line 1296 of file LocalisationCache.php.
References $e, directory, getFileName(), CdbWriter\open(), wfMkdirParents(), and writer.
|
private |
Current language code *.
Definition at line 1250 of file LocalisationCache.php.
|
private |
|
private |
Definition at line 1246 of file LocalisationCache.php.
|
private |
Definition at line 1248 of file LocalisationCache.php.