interface MultiOperationCache implements MultiGetCache, MultiDeleteCache, MultiPutCache (View source)

Interface for cache drivers that supports multiple items manipulation.

Methods

mixed[]
fetchMultiple(array $keys)

Returns an associative array of values for keys is found in cache.

bool
deleteMultiple(array $keys)

Deletes several cache entries.

bool
saveMultiple(array $keysAndValues, int $lifetime = 0)

Returns a boolean value indicating if the operation succeeded.

Details

mixed[] fetchMultiple(array $keys)

Returns an associative array of values for keys is found in cache.

Parameters

array $keys Array of keys to retrieve from cache

Return Value

mixed[] Array of retrieved values, indexed by the specified keys. Values that couldn't be retrieved are not contained in this array.

bool deleteMultiple(array $keys)

Deletes several cache entries.

Parameters

array $keys Array of keys to delete from cache

Return Value

bool TRUE if the operation was successful, FALSE if it wasn't.

bool saveMultiple(array $keysAndValues, int $lifetime = 0)

Returns a boolean value indicating if the operation succeeded.

Parameters

array $keysAndValues Array of keys and values to save in cache
int $lifetime The lifetime. If != 0, sets a specific lifetime for these cache entries (0 => infinite lifeTime).

Return Value

bool TRUE if the operation was successful, FALSE if it wasn't.