public function checkForCacheFile()
    {
        // first check if we can create a file
        if (!$this->canCreateCacheFile()) {
            return;
        }
        $cacheEntry = HtmlCacheCache::findOne(['uri' => $this->uri, 'siteId' => $this->siteId]);

        // check if cache exists
        if ($cacheEntry) {
            $file = $this->getCacheFileName($cacheEntry->uid);
            if (file_exists($file)) {
                // load cache - may return false if cache has expired
                if ($this->loadCache($file)) {
                    return \Craft::$app->end();
                }
            }
        }
        // Turn output buffering on
        ob_start();
    }