Defines the interface for expiring data in a key/value store.
Expanded class hierarchy of KeyValueStoreExpirableInterface
All classes that implement KeyValueStoreExpirableInterface
interface KeyValueStoreExpirableInterface extends KeyValueStoreInterface {
/**
* Saves a value for a given key with a time to live.
*
* @param string $key
* The key of the data to store.
* @param mixed $value
* The data to store.
* @param int $expire
* The time to live for items, in seconds.
*/
function setWithExpire($key, $value, $expire);
/**
* Sets a value for a given key with a time to live if it does not yet exist.
*
* @param string $key
* The key of the data to store.
* @param mixed $value
* The data to store.
* @param int $expire
* The time to live for items, in seconds.
*
* @return bool
* TRUE if the data was set, or FALSE if it already existed.
*/
function setWithExpireIfNotExists($key, $value, $expire);
/**
* Saves an array of values with a time to live.
*
* @param array $data
* An array of data to store.
* @param int $expire
* The time to live for items, in seconds.
*/
function setMultipleWithExpire(array $data, $expire);
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
KeyValueStoreExpirableInterface:: |
function | Saves an array of values with a time to live. | 1 | |
KeyValueStoreExpirableInterface:: |
function | Saves a value for a given key with a time to live. | 1 | |
KeyValueStoreExpirableInterface:: |
function | Sets a value for a given key with a time to live if it does not yet exist. | 1 | |
KeyValueStoreInterface:: |
public | function | Deletes an item from the key/value store. | 1 |
KeyValueStoreInterface:: |
public | function | Deletes multiple items from the key/value store. | 2 |
KeyValueStoreInterface:: |
public | function | Returns the stored value for a given key. | 1 |
KeyValueStoreInterface:: |
public | function | Returns all stored key/value pairs in the collection. | 2 |
KeyValueStoreInterface:: |
public | function | Returns the name of this collection. | 1 |
KeyValueStoreInterface:: |
public | function | Returns the stored key/value pairs for a given set of keys. | 2 |
KeyValueStoreInterface:: |
public | function | Saves a value for a given key. | 2 |
KeyValueStoreInterface:: |
public | function | Saves a value for a given key if it does not exist yet. | 2 |
KeyValueStoreInterface:: |
public | function | Saves key/value pairs. | 1 |