|
MediaWiki master
|
LCStore implementation which uses the standard DB functions to store data. More...
Inherits MediaWiki\Language\LCStore.

Public Member Functions | |||||||
| __construct (array $params) | |||||||
| finishWrite () | |||||||
| Finish a cache write transaction. | |||||||
| get ( $code, $key) | |||||||
| Get a value.
| |||||||
| lateFallback () | |||||||
Can this cache type delay fallback lookups to read time?Returning true will cause the fallbacks to be skipped when recaching data, and instead performed via multiple reads if necessary at runtime.This is best when performing lookups is extremely low-cost, such as LCStoreStaticArray with the lateFallback option.When reading from disk or network, trading off the space for fewer lookups may still be a win. Returning false will keep the classic behavior of pre-filling all the fallback chains for each language. | |||||||
| set ( $key, $value) | |||||||
Set a key to a given value.startWrite() must be called before this is called, and finishWrite() must be called after.
| |||||||
| startWrite ( $code) | |||||||
Start a cache write transaction.
| |||||||
LCStore implementation which uses the standard DB functions to store data.
Definition at line 23 of file LCStoreDB.php.
| MediaWiki\Language\LCStoreDB::__construct | ( | array | $params | ) |
Definition at line 39 of file LCStoreDB.php.
| MediaWiki\Language\LCStoreDB::finishWrite | ( | ) |
Finish a cache write transaction.
Implements MediaWiki\Language\LCStore.
Definition at line 78 of file LCStoreDB.php.
References Wikimedia\Rdbms\IDatabase\endAtomic(), Wikimedia\Rdbms\IDatabase\isReadOnly(), Wikimedia\Rdbms\IDatabase\newDeleteQueryBuilder(), Wikimedia\Rdbms\IDatabase\newInsertQueryBuilder(), and Wikimedia\Rdbms\IDatabase\startAtomic().
| MediaWiki\Language\LCStoreDB::get | ( | $code, | |
| $key ) |
Get a value.
Implements MediaWiki\Language\LCStore.
Definition at line 44 of file LCStoreDB.php.
References MediaWiki\MediaWikiServices\getInstance().
| MediaWiki\Language\LCStoreDB::lateFallback | ( | ) |
Can this cache type delay fallback lookups to read time?Returning true will cause the fallbacks to be skipped when recaching data, and instead performed via multiple reads if necessary at runtime.This is best when performing lookups is extremely low-cost, such as LCStoreStaticArray with the lateFallback option.When reading from disk or network, trading off the space for fewer lookups may still be a win. Returning false will keep the classic behavior of pre-filling all the fallback chains for each language.
Implements MediaWiki\Language\LCStore.
Definition at line 151 of file LCStoreDB.php.
| MediaWiki\Language\LCStoreDB::set | ( | $key, | |
| $value ) |
Set a key to a given value.startWrite() must be called before this is called, and finishWrite() must be called after.
| string | $key | |
| mixed | $value |
Implements MediaWiki\Language\LCStore.
Definition at line 115 of file LCStoreDB.php.
References Wikimedia\Rdbms\IReadableDatabase\encodeBlob().
| MediaWiki\Language\LCStoreDB::startWrite | ( | $code | ) |
Start a cache write transaction.
| string | $code | Language code |
Implements MediaWiki\Language\LCStore.
Definition at line 64 of file LCStoreDB.php.
References Wikimedia\Rdbms\IDatabase\isReadOnly().