get() public method

Retrieves a value from cache with a specified key.
public get ( string $key ) : string | false
$key string
return string | false
Esempio n. 1
0
 /**
  * @param string $key
  *
  * @return mixed|false
  */
 public function get($key)
 {
     $data = $this->adapter->get($this->_prefix . $key);
     if ($data === false) {
         return false;
     } else {
         return $this->serializer->deserialize($data);
     }
 }