public function ExpiringCache::set

Sets a value in the cache.

Parameters

string $key A unique key:

string $value The value to cache:

Overrides CacheInterface::set

File

drupal/core/vendor/kriswallsmith/assetic/src/Assetic/Cache/ExpiringCache.php, line 49

Class

ExpiringCache
Adds expiration to a cache backend.

Namespace

Assetic\Cache

Code

public function set($key, $value) {
  $this->cache
    ->set($key . '.expires', time() + $this->lifetime);
  $this->cache
    ->set($key, $value);
}