예제 #1
0
 /**
  * Retrieve an item from the cache by key.
  *
  * @param  string  $key
  * @param  mixed   $default
  * @return mixed
  */
 public function get($key, $default = null)
 {
     $value = $this->store->get($this->taggedItemKey($key));
     return !is_null($value) ? $value : value($default);
 }
예제 #2
0
 /**
  * Get the unique tag identifier for a given tag.
  *
  * @param  string  $name
  * @return string
  */
 public function tagId($name)
 {
     return $this->store->get($this->tagKey($name)) ?: $this->resetTag($name);
 }