function drush_cache_set

8.0.x cache.inc drush_cache_set($cid, $data, $bin = 'default', $expire = DRUSH_CACHE_PERMANENT)
6.x cache.inc drush_cache_set($cid, $data, $bin = 'default', $expire = DRUSH_CACHE_PERMANENT)
7.x cache.inc drush_cache_set($cid, $data, $bin = 'default', $expire = DRUSH_CACHE_PERMANENT)
4.x cache.drush.inc drush_cache_set($cid = NULL, $data = '', $bin = NULL, $expire = CACHE_PERMANENT)
5.x cache.inc drush_cache_set($cid, $data, $bin = 'default', $expire = DRUSH_CACHE_PERMANENT)
master cache.inc drush_cache_set($cid, $data, $bin = 'default', $expire = DRUSH_CACHE_PERMANENT)

Store data in the persistent cache.

Parameters

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

$data: The data to store in the cache.

string $bin: The cache bin to store the data in.

$expire: One of the following values:

Return value

bool

5 calls to drush_cache_set()
DrupalBoot::bootstrap_drupal_full in lib/Drush/Boot/DrupalBoot.php
Attempt to load the full Drupal system.
drush_complete_cache_set in includes/complete.inc
Stores caches for completions.
drush_sandwich_make_me_a_sandwich in examples/sandwich.drush.inc
Implements drush_hook_COMMAND().
drush_sitealias_cache_alias_by_path in includes/sitealias.inc
Cache the specified alias in the alias path cache. The alias path cache creates a lookup from the site folder (/path/to/drupal/sites/default) to the provided alias record.
_drush_add_commandfiles in includes/command.inc

File

includes/cache.inc, line 116
Drush cache API

Code

function drush_cache_set($cid, $data, $bin = 'default', $expire = DRUSH_CACHE_PERMANENT) {
  $ret = _drush_cache_get_object($bin)->set($cid, $data, $expire);
  if ($ret) {
    drush_log(dt("Cache SET cid: !cid", array('!cid' => $cid)), LogLevel::DEBUG);
  }
  return $ret;
}