public function rememberForever($key, Closure $callback)
    {
        $value = $this->get($key);

        // If the item exists in the cache we will just return this immediately
        // and if not we will execute the given Closure and cache the result
        // of that forever so it is available for all subsequent requests.
        if (! is_null($value)) {
            return $value;
        }

        $this->forever($key, $value = $callback());

        return $value;
    }
public function rememberForever($key, Closure $callback)
    {
        $value = $this->get($key);

        // If the item exists in the cache we will just return this immediately
        // and if not we will execute the given Closure and cache the result
        // of that forever so it is available for all subsequent requests.
        if (! is_null($value)) {
            return $value;
        }

        $this->forever($key, $value = $callback());

        return $value;
    }
public function rememberForever ( $ key , Closure $ callback ) { $ value = $ this -> get ( $ key ) ; // If the item exists in the cache we will just return this immediately // and if not we will execute the given Closure and cache the result // of that forever so it is available for all subsequent requests. if ( ! is_null ( $ value ) ) { return $ value ; } $ this -> forever ( $ key , $ value = $ callback ( ) ) ; return $ value ; }
Get an item from the cache, or execute the given Closure and store the result forever.

@param  string  $key
@param  \Closure  $callback
@return mixed
Get an item from the cache or execute the given Closure and store the result forever .