Beispiel #1
0
 /**
  * Retrieve an item from the cache and delete it.
  *
  * @param string $key
  * @param mixed $default
  * @return mixed 
  * @static 
  */
 public static function pull($key, $default = null)
 {
     return \Illuminate\Cache\Repository::pull($key, $default);
 }
 /**
  * Retrieve an item from the cache and delete it.
  *
  * @param  string $key
  * @param  mixed  $default
  * @return mixed
  * @throws \Propaganistas\LaravelCacheKeywords\Exceptions\ReservedCacheKeyPatternException
  */
 public function pull($key, $default = null)
 {
     $this->checkReservedKeyPattern($key);
     if (!$this->operatingOnKeywords()) {
         $this->resetCurrentKeywords();
     }
     return parent::pull($key, $default);
 }
Beispiel #3
0
 /**
  * Retrieve an item from the cache and delete it.
  *
  * @param  mixed  $key
  * @param  mixed  $default
  * @return mixed
  */
 public function pull($key, $default = null)
 {
     if (is_array($key)) {
         return $this->pullMany($key, $default);
     }
     return parent::pull($key, $default);
 }
Beispiel #4
0
 /**
  * Retrieve an item from the cache and delete it.
  *
  * @param  string $key
  * @param  mixed  $default
  *
  * @return mixed
  */
 public function pull($key, $default = null)
 {
     return $this->enabled ? $this->cache->pull($key, $default) : $default;
 }