get() 공개 메소드

Returns data of the specified cache-key.
public get ( string $key ) : mixed
$key string
리턴 mixed
예제 #1
0
 public function latencies(&$response)
 {
     $lastLatency = $this->distributedCache->get('core/latency');
     $result = array('frontend' => 0, 'backend' => 0, 'database' => 0, 'session' => 0, 'cache' => 0);
     foreach ($result as $key => &$value) {
         $value = isset($lastLatency[$key]) ? $lastLatency[$key] : array();
     }
     $response['JarvesBundle/latencies'] = $result;
 }
예제 #2
0
파일: Cacher.php 프로젝트: jarves/jarves
 /**
  * Returns a local cache value.
  * 
  * @param string $key
  *
  * @return mixed null when not found
  */
 public function getFastCache($key)
 {
     return $this->fastCache->get($key);
 }