Ejemplo n.º 1
0
 /**
  * Store an item.
  *
  * @param  string $cacheId
  * @param  mixed  $value
  *
  * @return bool
  */
 public function setItem($cacheId, $value)
 {
     $path = $this->keyPath($cacheId);
     return FileUtils::write($path, $this->compact($value));
 }
Ejemplo n.º 2
0
 /**
  * Store an item.
  *
  * @param string $cacheId
  * @param mixed  $value
  *
  * @return bool
  */
 public function setItem($cacheId, $value)
 {
     $path = $this->keyPath($cacheId);
     return FileUtils::write($path, json_encode($value, JSON_PRETTY_PRINT));
 }