function _drush_cache_command_set

8.0.x cache_8.inc _drush_cache_command_set($cid, $data, $bin, $expire, $tags)
8.0.x cache.inc _drush_cache_command_set($cid, $data, $bin, $expire, $tags)
7.x cache_8.inc _drush_cache_command_set($cid, $data, $bin, $expire, $tags)
7.x cache.inc _drush_cache_command_set($cid, $data, $bin, $expire, $tags)
master cache_8.inc _drush_cache_command_set($cid, $data, $bin, $expire, $tags)
master cache.inc _drush_cache_command_set($cid, $data, $bin, $expire, $tags)
1 string reference to '_drush_cache_command_set'
drush_cache_command_set in commands/core/cache.drush.inc
Set an object in the cache.

File

commands/core/drupal/cache.inc, line 23
Engine for the cache commands.

Code

function _drush_cache_command_set($cid, $data, $bin, $expire, $tags) {
  // Convert the "expire" argument to a valid value for Drupal's cache_set().
  if (is_null($bin)) {
    $bin = _drush_cache_bin_default();
  }
  if ($expire == 'CACHE_TEMPORARY') {
    $expire = CACHE_TEMPORARY;
  }
  if (!isset($expire) || $expire == 'CACHE_PERMANENT') {
    $expire = CACHE_PERMANENT;
  }

  // D6/D7 don't natively support cache tags.
  return cache_set($cid, $data, $bin, $expire);
}