Create a cache file.

@return void
557393
protected function createCacheFile()
    {
        $this->createCacheDir();

        $cacheFilePath = $this->getCacheFile();

        if ( ! file_exists($cacheFilePath)) {
            touch($cacheFilePath);
        }
    }
1051501
public function saveCacheListing()
    {
        $s  = serialize($this->cacheListing);
        $id = shmop_open(MemoryHandler::INDEX_LIST, MemoryHandler::WRITE_MOD, MemoryHandler::DEFAULT_PERMISSIONS, strlen($s));

        return shmop_write($id, $s, MemoryHandler::DEFAULT_OFFSET);
    }
988084
public function writeCache()
    {
        $this->getFileSystem()->put($this->getCachePath(), $this->serializedInformationForCache($this->information));

        return $this;
    }
702824
protected function prepare() : void
    {
        if ($this->prepared) {
            return;
        }

        if ($this->cacheEnabled && file_exists($this->cacheFile)) {
            $this->loadFromCache();
            $this->prepared = true;
            return;
        }

        $routeCollector = new RouteCollector();
        $routeDefinitionCallback = $this->routeDefinitionCallback;
        $routeDefinitionCallback($routeCollector);

        $data = $routeCollector->generateRoutesData(
            new StdParser(),
            new DataGeneratorGroupCountBased()
        );
        $this->routes = $data['routes'];
        $this->dispatchData = $data['dispatch_data'];

        if ($this->cacheEnabled) {
            $this->saveToCache($data);
        }

        $this->prepared = true;
    }
492575
protected function refillCache()
    {

        // lets clear the cache so we can fill it anew
        foreach (new \DirectoryIterator($this->getConfig()->getValue('cache/dir')) as $fileInfo) {
            if (!$fileInfo->isDot() && !$fileInfo->isDir()) {
                // unlink the file
                unlink($fileInfo->getPathname());
            }
        }

        // lets create the definitions anew
        return $this->createDefinitions();
    }
415683
public static function CreateCacheJS(){
            $oThis = self::CreateInstanceIfNotExists();

            if(count($oThis->aJS) > 0){
                $sCacheFilename = Storage::Join("dir.public.assets", strtolower($oThis->sNamespace).".js");
                Storage::Set("assets.js", Storage::Join("route.root", "public/assets/".strtolower($oThis->sNamespace).".js"));

                if(!file_exists($sCacheFilename) || Storage::Get("debug", false)){
                    $sBuffer = "";

                    foreach($oThis->aJS as $sAppendBuffer)
                        $sBuffer .= $sAppendBuffer;

                    file_put_contents($sCacheFilename, $sBuffer);
                }
            }
        }
17823
protected function generateFiles()
    {
        foreach ($this->files as $key => $file) {
            $file = $this->formatContent($file);

            $this->makeFile($key, $file);
        }
    }
141822
protected function createCacheAdapter()
    {
        $adapter = new Adapter\File($this->options['files_cache_directory']);
        $adapter->setOption('ttl', $this->options['files_cache_ttl']);

        return new Cache($adapter);
    }
1362165
public function setCache() {
        if (!file_exists($this->_fileName)) {
            file_put_contents($this->_fileName, $this->_compress(serialize($this->_content)));
        }

        $timeAgo = time() - filemtime($this->_fileName);

        if ($timeAgo > $this->_time) {
            file_put_contents($this->_fileName, $this->_compress(serialize($this->_content)));
        }
    }
556546
protected function _initCache()
    {
        if (!Cache::getConfig(static::$cacheConfig)) {
            Cache::setConfig(static::$cacheConfig, [
                'className' => $this->_getDefaultCacheConfigClassName(),
                'prefix' => static::$cacheConfig . '_' . $this->_identifier,
                'duration' => $this->getConfig('interval'),
            ]);
        }
    }
612275
private function initCache()
    {
        // Create a new Container object, needed by the cache manager.
        $container = new Container;

        // The CacheManager creates the cache "repository" based on config values
        $container['config'] = [
            'cache.default' => 'file',
            'cache.stores.file' => [
                'driver' => 'file',
                'path' => __DIR__ . '/cache'
            ]
        ];

        // To use the file cache driver we need an instance of Illuminate's Filesystem, also stored in the container
        $container['files'] = new Filesystem;
        // Create the CacheManager
        $cacheManager = new CacheManager($container);

        // Get the default cache driver (file in this case)
        return $cacheManager->store();

    }
653572
private static function caches()
    {
        $files = ['Driver', 'FileDriver', 'ArrayDriver', 'PhpFilesDriver', 'ApcDriver', 'PDODriver'];
        $folder = static::$root.'Caches/Drivers'.'/';

        self::call($files, $folder);

        $files = ['Item', 'Cache'];
        $folder = static::$root.'Caches'.'/';

        self::call($files, $folder);

        $files = ['CacheItemNotFoundException', 'DriverNotFoundException', 'DatabaseSurfaceDisabledException'];
        $folder = static::$root.'Caches/Exceptions'.'/';

        self::call($files, $folder);
    }
394100
private function generate()
	{
		// only load sections if we dont have a cache
		$this->discoverComponentSections();

		// generate output by processing sections
		$this->output['sections'] = $this->processComponentSections($this->sections);

		// remove duplicate available versions & order
		$this->output['versions']['available'] = array_unique($this->output['versions']['available']);

		// get the highest version available
		$this->output['versions']['max'] = end($this->output['versions']['available']);

		// create cache folder
		$cacheFile = PATH_APP . DS . 'cache' . DS . 'api' . DS . 'documentation.json';

		if (App::has('filesystem') && !App::get('filesystem')->exists(dirname($cacheFile)))
		{
			App::get('filesystem')->makeDirectory(dirname($cacheFile));
		}

		// save cache file
		file_put_contents($cacheFile, json_encode($this->output));
	}
1189505
private function createCacheFile($key)
    {
        $cache_file = $this->path($key);
        if (!file_exists($cache_file)) {
            $directory = dirname($cache_file);
            if (!is_dir($directory)) {
                $make_dir_result = mkdir($directory, 0755, true);
                if ($make_dir_result === false) {
                    return false;
                }
            }
            $create_result = touch($cache_file);
            if ($create_result === false) {
                return false;
            }
        }

        return $cache_file;
    }
344444
protected function createMemcachedDriver()
    {
        $servers = $this->app['config']['cache.memcached'];

        $memcached = $this->app['memcached.connector']->connect($servers);

        return $this->repository(new MemcachedStore($memcached, $this->getPrefix()));
    }
429195
public static function buildCache()
    {
        QRtools::markTime('before_build_cache');

        $mask = new QRmask();
        for ($a=1; $a <= Constants::QRSPEC_VERSION_MAX; $a++) {
            $frame = QRspec::newFrame($a);
            if (Constants::QR_IMAGE) {
                $fileName = Constants::QR_CACHE_DIR.'frame_'.$a.'.png';
                QRimage::png(self::binarize($frame), $fileName, 1, 0);
            }

            $width = count($frame);
            $bitMask = array_fill(0, $width, array_fill(0, $width, 0));
            for ($maskNo=0; $maskNo<8; $maskNo++)
                $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true);
        }

        QRtools::markTime('after_build_cache');
    }
1137938
protected function setCachePath()
    {
        $filename = basename($this->pathFile);

        $this->pathCache = $this->cacheDir . '/' . $filename;
    }