protected function MemcachedCache::doSave

Puts data into the cache.

Parameters

string $id The cache id.:

string $data The cache entry/data.:

bool|int $lifeTime The lifetime. If != false, sets a specific lifetime for this: cache entry (null => infinite lifeTime).

Return value

boolean TRUE if the entry was successfully stored in the cache, FALSE otherwise.

Overrides CacheProvider::doSave

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Cache/MemcachedCache.php, line 83

Class

MemcachedCache
Memcached cache provider.

Namespace

Doctrine\Common\Cache

Code

protected function doSave($id, $data, $lifeTime = 0) {
  if ($lifeTime > 30 * 24 * 3600) {
    $lifeTime = time() + $lifeTime;
  }
  return $this->memcached
    ->set($id, $data, (int) $lifeTime);
}