public function cache($data, $view, $mergeData = null, $minutes = null, $key = null, $tag = null)
    {
        if (! $this->enabled) {
            return call_user_func($this->renderView($view, $data, $mergeData));
        }

        $viewKey = $this->getCacheKeyForView($view, $key);

        $mergeData = $mergeData ?: [];

        $tags = $this->getTags($tag);

        $minutes = $this->resolveCacheDuration($minutes);

        if ($this->cacheIsTaggable && $minutes === null) {
            return $this->cache
                ->tags($tags)
                ->rememberForever($viewKey, $this->renderView($view, $data, $mergeData));
        }

        if ($this->cacheIsTaggable) {
            return $this->cache
                ->tags($tags)
                ->remember($viewKey, $minutes, $this->renderView($view, $data, $mergeData));
        }

        if ($minutes === null) {
            return $this->cache
                ->rememberForever($viewKey, $this->renderView($view, $data, $mergeData));
        }

        return $this->cache
            ->remember($viewKey, $minutes, $this->renderView($view, $data, $mergeData));
    }