public function remember(string $key, callable $callBack)
    {
        $existing = $this->get($key);
        if ($existing !== null) {
            return $existing;
        }

        $result = $callBack();
        return $this->put($key, $result);
    }
public function remember(string $key, callable $callBack)
    {
        $existing = $this->get($key);
        if ($existing !== null) {
            return $existing;
        }

        $result = $callBack();
        return $this->put($key, $result);
    }
public function remember ( string $ key , callable $ callBack ) { $ existing = $ this -> get ( $ key ) ; if ( $ existing !== null ) { return $ existing ; } $ result = $ callBack ( ) ; return $ this -> put ( $ key , $ result ) ; }
Remembers the return value of the callback and returns that
if available on next call.
@param $key string
@param callable $callBack
@return mixed
Remembers the return value of the callback and returns that if available on next call .