src/Menu/Listeners/MenuComposer.php
private function cacheIfConfigured($closure)
    {
        if (config('menu.cache.enable')) {
            $key = config('menu.cache.key');
            $minutes = config('menu.cache.minutes');

            return Cache::remember($key, $minutes, function () use ($closure) {
                return call_user_func($closure);
            });
        }

        return call_user_func($closure);
    }
private function cacheIfConfigured($closure)
    {
        if (config('menu.cache.enable')) {
            $key = config('menu.cache.key');
            $minutes = config('menu.cache.minutes');

            return Cache::remember($key, $minutes, function () use ($closure) {
                return call_user_func($closure);
            });
        }

        return call_user_func($closure);
    }
uses the cache if it was configured or calculates
the plain output every request otherwise.

@param $closure

@return array