/** * Get an item from the cache, or store the default value forever. * * @param string $key * @param \Closure $callback * * @return mixed */ public function sear($key, Closure $callback) { if ($this->enabled) { return $this->cache->sear($key, $callback); } return $callback; }
/** * Get an item from the cache, or store the default value forever. * * @param string $key * @param \Closure $callback * @return mixed * @static */ public static function sear($key, $callback) { return \Illuminate\Cache\Repository::sear($key, $callback); }
/** * Get an item from the cache, or store the default value forever. * * @param string $key * @param \Closure $callback * @return mixed */ public function sear($key, Closure $callback) { if (is_array($key)) { return $this->searMany($key, $callback); } return parent::sear($key, $callback); }