function DrushCacheInterface::set

6.x cache.inc DrushCacheInterface::set($cid, $data, $expire = DRUSH_CACHE_PERMANENT)
5.x cache.inc DrushCacheInterface::set($cid, $data, $expire = DRUSH_CACHE_PERMANENT)

Store data in the persistent cache.

Parameters

$cid: The cache ID of the data to store.

$data: The data to store in the cache.

$expire: One of the following values:

  • DRUSH_CACHE_PERMANENT: Indicates that the item should never be removed unless explicitly told to using _drush_cache_clear_all() with a cache ID.
  • DRUSH_CACHE_TEMPORARY: Indicates that the item should be removed at the next general cache wipe.
  • A Unix timestamp: Indicates that the item should be kept at least until the given time, after which it behaves like CACHE_TEMPORARY.
1 method overrides DrushCacheInterface::set()
DrushFileCache::set in includes/cache.inc
Store data in the persistent cache.

File

includes/cache.inc, line 269
Drush cache API

Class

DrushCacheInterface
Interface for cache implementations.

Code

function set($cid, $data, $expire = DRUSH_CACHE_PERMANENT);