/** * @param $key * @param $value */ public function set($key, $value) { $file = $this->getFilename($key); file_put_contents($file, $this->serializer->serialize($value)); if ($this->chmod !== null) { chmod($file, $this->chmod); } }
/** * Sets a cache entry * * @param $key * @param $value * @return void */ public function set($key, $value) { $item = $this->pool->getItem($key); $item->set($this->serializer->serialize($value), $this->expire); }
/** * Sets a cache entry * * @param $key * @param $value * @return void */ public function set($key, $value) { if ($this->ttl === null) { $this->client->set($key, $this->serializer->serialize($value)); } else { $this->client->set($key, $this->serializer->serialize($value), 'ex', $this->ttl); } }