class AcquiaPurgeStateStorageMemcache in Acquia Purge 7
Memcached backed state storage.
Hierarchy
- class \AcquiaPurgeStateStorageBase implements AcquiaPurgeStateStorageInterface
Expanded class hierarchy of AcquiaPurgeStateStorageMemcache
File
- lib/
state/ AcquiaPurgeStateStorageMemcache.php, line 11 - Contains AcquiaPurgeStateStorageMemcache.
View source
class AcquiaPurgeStateStorageMemcache extends AcquiaPurgeStateStorageBase {
/**
* Memcached key used to store our state data in.
*
* @var string
*/
protected $key;
/**
* Memcached bin used to store our state data in memcached.
*
* @var string
*/
protected $bin;
/**
* Construct AcquiaPurgeStateStorageMemcache.
*
* @param string $key
* Memcached key used to store our state data in.
* @param string $bin
* Memcached bin used to store our state data in memcached.
*/
public function __construct($key, $bin) {
$this->key = $key;
$this->bin = $bin;
parent::__construct(dmemcache_get($this->key, $this->bin));
}
/**
* {@inheritdoc}
*/
public function commit() {
if (!$this->commit) {
return;
}
else {
$this->commit = FALSE;
}
dmemcache_set($this->key, $this->buffer, 0, $this->bin);
}
/**
* {@inheritdoc}
*/
public function wipe() {
parent::wipe();
dmemcache_delete($this->key, $this->bin);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AcquiaPurgeStateStorageBase:: |
protected | property | The payload buffer which gets synchronized with memcached. | |
AcquiaPurgeStateStorageBase:: |
protected | property | Indicates if ::commit() has been registered to be called at shutdown. | |
AcquiaPurgeStateStorageBase:: |
protected | property | Item instances. | |
AcquiaPurgeStateStorageBase:: |
public | function |
Retrieve the object named $key. Overrides AcquiaPurgeStateStorageInterface:: |
|
AcquiaPurgeStateStorageBase:: |
public | function |
Retrieve a counter object named $key. Overrides AcquiaPurgeStateStorageInterface:: |
|
AcquiaPurgeStateStorageBase:: |
public | function |
Store the state item in state item storage. Overrides AcquiaPurgeStateStorageInterface:: |
|
AcquiaPurgeStateStorageMemcache:: |
protected | property | Memcached bin used to store our state data in memcached. | |
AcquiaPurgeStateStorageMemcache:: |
protected | property | Memcached key used to store our state data in. | |
AcquiaPurgeStateStorageMemcache:: |
public | function |
Commit the state data to its persistent storage location. Overrides AcquiaPurgeStateStorageInterface:: |
|
AcquiaPurgeStateStorageMemcache:: |
public | function |
Wipe all state data. Overrides AcquiaPurgeStateStorageBase:: |
|
AcquiaPurgeStateStorageMemcache:: |
public | function |
Construct AcquiaPurgeStateStorageMemcache. Overrides AcquiaPurgeStateStorageBase:: |