Memcached-based cache. More...
Public Member Functions | |
__construct ($host=Memcached::DEFAULT_HOST, $port=Memcached::DEFAULT_PORT, $buffer=Memcached::DEFAULT_BUFFER) | |
__destruct () | |
clean () | |
getList ($indexes) | |
increment ($key, $value) | |
decrement ($key, $value) | |
get ($index) | |
delete ($index, $time=null) | |
append ($key, $data) | |
Static Public Member Functions | |
static | create ($host=Memcached::DEFAULT_HOST, $port=Memcached::DEFAULT_PORT, $buffer=Memcached::DEFAULT_BUFFER) |
Public Attributes | |
const | DEFAULT_PORT = 11211 |
const | DEFAULT_HOST = '127.0.0.1' |
const | DEFAULT_BUFFER = 16384 |
Protected Member Functions | |
store ($method, $index, $value, $expires=Cache::EXPIRES_MINIMUM) | |
Private Member Functions | |
parseGetRequest ($single) | |
changeInteger ($command, $key, $value) | |
sendRequest ($command) | |
Private Attributes | |
$link = null | |
$buffer = Memcached::DEFAULT_BUFFER |
Memcached-based cache.
Definition at line 23 of file Memcached.class.php.
Memcached::__construct | ( | $ | host = Memcached::DEFAULT_HOST , |
|
$ | port = Memcached::DEFAULT_PORT , |
|||
$ | buffer = Memcached::DEFAULT_BUFFER | |||
) |
Definition at line 45 of file Memcached.class.php.
References $buffer.
Memcached::__destruct | ( | ) |
Definition at line 64 of file Memcached.class.php.
Memcached::append | ( | $ | key, | |
$ | data | |||
) |
Reimplemented from CachePeer.
Definition at line 154 of file Memcached.class.php.
References sendRequest().
Memcached::changeInteger | ( | $ | command, | |
$ | key, | |||
$ | value | |||
) | [private] |
Definition at line 294 of file Memcached.class.php.
References sendRequest().
Referenced by decrement(), and increment().
Memcached::clean | ( | ) |
Reimplemented from CachePeer.
Definition at line 74 of file Memcached.class.php.
References sendRequest().
static Memcached::create | ( | $ | host = Memcached::DEFAULT_HOST , |
|
$ | port = Memcached::DEFAULT_PORT , |
|||
$ | buffer = Memcached::DEFAULT_BUFFER | |||
) | [static] |
Definition at line 36 of file Memcached.class.php.
References $buffer.
Memcached::decrement | ( | $ | key, | |
$ | value | |||
) |
Reimplemented from CachePeer.
Definition at line 112 of file Memcached.class.php.
References changeInteger().
Memcached::delete | ( | $ | index, | |
$ | time = null | |||
) |
Definition at line 132 of file Memcached.class.php.
References sendRequest().
Memcached::get | ( | $ | index | ) |
Reimplemented from CachePeer.
Definition at line 117 of file Memcached.class.php.
References parseGetRequest(), and sendRequest().
Memcached::getList | ( | $ | indexes | ) |
Reimplemented from CachePeer.
Definition at line 89 of file Memcached.class.php.
References parseGetRequest(), and sendRequest().
Memcached::increment | ( | $ | key, | |
$ | value | |||
) |
Reimplemented from CachePeer.
Definition at line 107 of file Memcached.class.php.
References changeInteger().
Memcached::parseGetRequest | ( | $ | single | ) | [private] |
Definition at line 226 of file Memcached.class.php.
Memcached::sendRequest | ( | $ | command | ) | [private] |
Definition at line 316 of file Memcached.class.php.
Referenced by append(), changeInteger(), clean(), delete(), get(), getList(), and store().
Memcached::store | ( | $ | method, | |
$ | index, | |||
$ | value, | |||
$ | expires = Cache::EXPIRES_MINIMUM | |||
) | [protected] |
Reimplemented from CachePeer.
Definition at line 174 of file Memcached.class.php.
References Assert::checkFloat(), Cache::DO_NOT_CACHE, and sendRequest().
Memcached::$buffer = Memcached::DEFAULT_BUFFER [private] |
Definition at line 31 of file Memcached.class.php.
Referenced by __construct(), and create().
Memcached::$link = null [private] |
Definition at line 29 of file Memcached.class.php.
const Memcached::DEFAULT_BUFFER = 16384 |
Definition at line 27 of file Memcached.class.php.
const Memcached::DEFAULT_HOST = '127.0.0.1' |
Definition at line 26 of file Memcached.class.php.
const Memcached::DEFAULT_PORT = 11211 |
Definition at line 25 of file Memcached.class.php.