public function get($key)
 {
     $path = $this->keyPath($key);
     $data = WURFL_FileUtils::read($path);
     if (!is_null($data) && $this->expired($path)) {
         unlink($path);
         return NULL;
     }
     return $data;
 }
示例#2
0
 public function load($key)
 {
     if (($data = $this->cacheLoad($key)) !== null) {
         return $data->value();
     } else {
         $path = $this->keyPath($key);
         $value = WURFL_FileUtils::read($path);
         if ($value === null) {
             return null;
         }
         $this->cacheSave($key, $value);
         return $this->unwrap($value, $path);
     }
 }
示例#3
0
 public function load($key)
 {
     $path = $this->keyPath($key);
     $value = WURFL_FileUtils::read($path);
     return isset($value) ? $this->unwrap($value, $path) : NULL;
 }
 public function load($objectId)
 {
     $path = $this->keyPath($objectId);
     return WURFL_FileUtils::read($path);
 }