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;
 }
Beispiel #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);
     }
 }
Beispiel #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);
 }