Exemple #1
0
 private function getCache($key)
 {
     $cache = new FileCache();
     $data = $cache[$key];
     if (!$data) {
         return false;
     }
     $jsonData = @json_decode($data, true);
     if ($jsonData['expire_time'] < time()) {
         $cache->delete($key);
         return false;
     }
     return $jsonData['value'];
 }