예제 #1
0
 /**
  * @param $key
  * @return null|mixed
  */
 public function get($key)
 {
     $file = $this->getFilename($key);
     if ($this->exists($file) && $this->valid($file)) {
         return $this->serializer->deserialize(file_get_contents($file));
     }
     return null;
 }
예제 #2
0
 /**
  * Gets a cache entry
  * returning null if not in cache
  *
  * @param $key
  * @return null|mixed
  */
 public function get($key)
 {
     $item = $this->pool->getItem($key);
     if ($item->isMiss() === false) {
         return $this->serializer->deserialize($item->get());
     } else {
         return null;
     }
 }
예제 #3
0
 /**
  * Gets a cache entry
  * returning null if not in cache
  *
  * @param $key
  * @return null|mixed
  */
 public function get($key)
 {
     return $this->serializer->deserialize($this->client->get($key));
 }