protected function serveFromCache($file, $hit = true, $setCacheHeaders = true)
    {
        /**
         * Cache object exists, set the appropriate headers and return the
         * contents of the file.
         **/

        $aStats = stat($this->cdnCacheDir . $file);

        //  Set cache headers
        if ($setCacheHeaders) {
            $this->setCacheHeaders($aStats['mtime'], $file, $hit);
        }

        //  Work out content type
        $oCdn  = Factory::service('Cdn', 'nails/module-cdn');
        $sMime = $oCdn->getMimeFromFile($this->cdnCacheDir . $file);

        header('Content-Type: ' . $sMime, true);
        header('Content-Length: ' . $aStats['size']);

        // --------------------------------------------------------------------------

        //  Send the contents of the file to the browser
        Factory::helper('file');
        readFileChunked($this->cdnCacheDir . $file);

        /**
         * Kill script, th, th, that's all folks.
         * Stop the output class from hijacking our headers and
         * setting an incorrect Content-Type
         **/

        exit(0);
    }