Inherits BagOStuff.
Public Member Functions | |
| __construct ($dir=false) | |
| encode ($value, $expiry) | |
| Encode value and expiry for storage. | |
| decode ($blob) | |
| getReader () | |
| getWriter () | |
| get ($key) | |
| Get an item with the given key. | |
| set ($key, $value, $exptime=0) | |
| Set an item. | |
| delete ($key, $time=0) | |
| add ($key, $value, $exptime=0) | |
| keys () | |
Public Attributes | |
| $mHandler | |
| $mFile | |
| $mReader | |
| $mWriter | |
| $mDisabled | |
Slow due to the need to constantly open and close the file to avoid holding writer locks. Intended for development use only, as a memcached workalike for systems that don't have it.
Definition at line 592 of file BagOStuff.php.
| DBABagOStuff::__construct | ( | $ | dir = false |
) |
Definition at line 595 of file BagOStuff.php.
References $wgDBAhandler, $wgTmpDirectory, wfDebug(), and wfWikiID().
| DBABagOStuff::add | ( | $ | key, | |
| $ | value, | |||
| $ | exptime = 0 | |||
| ) |
Reimplemented from BagOStuff.
Definition at line 701 of file BagOStuff.php.
References $blob, decode(), encode(), getWriter(), wfProfileIn(), and wfProfileOut().
| DBABagOStuff::decode | ( | $ | blob | ) |
Definition at line 619 of file BagOStuff.php.
References $blob.
| DBABagOStuff::delete | ( | $ | key, | |
| $ | time = 0 | |||
| ) |
Reimplemented from BagOStuff.
Definition at line 688 of file BagOStuff.php.
References getWriter(), wfDebug(), wfProfileIn(), and wfProfileOut().
| DBABagOStuff::encode | ( | $ | value, | |
| $ | expiry | |||
| ) |
Encode value and expiry for storage.
Definition at line 610 of file BagOStuff.php.
References BagOStuff::convertExpiry().
| DBABagOStuff::get | ( | $ | key | ) |
Get an item with the given key.
Returns false if it does not exist.
| $key | string |
Reimplemented from BagOStuff.
Definition at line 650 of file BagOStuff.php.
References decode(), getReader(), getWriter(), wfDebug(), wfProfileIn(), and wfProfileOut().
| DBABagOStuff::getReader | ( | ) |
| DBABagOStuff::getWriter | ( | ) |
Definition at line 642 of file BagOStuff.php.
References wfDebug().
Referenced by add(), delete(), get(), getReader(), and set().
| DBABagOStuff::keys | ( | ) |
Reimplemented from BagOStuff.
Definition at line 725 of file BagOStuff.php.
References $reader, $result, and getReader().
| DBABagOStuff::set | ( | $ | key, | |
| $ | value, | |||
| $ | exptime = 0 | |||
| ) |
Set an item.
| $key | string | |
| $value | mixed | |
| $exptime | int Either an interval in seconds or a unix timestamp for expiry |
Reimplemented from BagOStuff.
Definition at line 674 of file BagOStuff.php.
References $blob, encode(), getWriter(), wfDebug(), wfProfileIn(), and wfProfileOut().
| DBABagOStuff::$mDisabled |
Definition at line 593 of file BagOStuff.php.
| DBABagOStuff::$mFile |
Definition at line 593 of file BagOStuff.php.
| DBABagOStuff::$mHandler |
Definition at line 593 of file BagOStuff.php.
| DBABagOStuff::$mReader |
Definition at line 593 of file BagOStuff.php.
| DBABagOStuff::$mWriter |
Definition at line 593 of file BagOStuff.php.
1.5.9