Get the contents of the cache file.

@return \Illuminate\Support\Collection
344783
private function getCache()
    {
        $cachePath = $this->getCachePath();

        if (!$this->files->exists($cachePath)) {
            $this->createCache();

            $this->optimize();
        }

        return collect(json_decode($this->files->get($cachePath), true));
    }
292733
public function getAll()
    {
        $values = json_decode(file_get_contents($this->cacheFile), true);

        if( ! is_array($values)) return [];
        
        foreach ($values as $key => $value) {
            $values[$key] = unserialize($value);
        }
        return $values;
    }
1097003
public function content()
    {
        if (is_null($this->session->get($this->instance))) {
            return new Collection([]);
        }

        return $this->session->get($this->instance);
    }
973242
public function contents()
    {
        $files = array();
        foreach ($this->tar->listContent() as $data) {
          $files[$data['filename']] = $data;
        }

        return $files;
    }
372627
public function getCacheDir()
    {
        $dir=$this->m_cacheDir;
        if(empty($dir)){
            $dir=__DIR__."/../../../../../../_cache";
        }
        if(!file_exists($dir)){
            File::createDir($dir);
        }
        return rtrim($dir)."/";
    }
619553
public function getContents()
    {
        $file = $this->getPath();

        // Get an unserialize
        $configuration = file_get_contents($file);
        $configuration = unserialize($configuration);

        return $configuration;
    }
585656
public static function get_cache_content() {
        if (!isset(self::$plugintypes)) {
            self::fill_all_caches();
        }

        $cache = array(
            'subsystems'        => self::$subsystems,
            'plugintypes'       => self::$plugintypes,
            'plugins'           => self::$plugins,
            'parents'           => self::$parents,
            'subplugins'        => self::$subplugins,
            'classmap'          => self::$classmap,
            'classmaprenames'   => self::$classmaprenames,
            'filemap'           => self::$filemap,
            'version'           => self::$version,
        );

        return '<?php
$cache = '.var_export($cache, true).';
';
    }
130642
public function retrieve() {
        $filePath = $this->cacheDir . "/swagger/swagger.json";
        if($this->fileSystem->exists($filePath)) {
            return file_get_contents($filePath);
        } else {
            return $this->container->get('swagger.definition.builder')->buildSwagger();
        }
    }
887806
private function getCachedContent()
    {
        $item = null;

        if (null !== $this->cache) {
            $item = $this->cache->getItem($this->cacheKey);
            $cacheContent = $item->get();

            if ($item->isHit() && null !== $cacheContent) {
                $this->contentCache = $cacheContent;
            }
        }

        return $item;
    }
53298
public function getAllMetadata()
    {
        $configName     = ($this->config !== null) ? $this->config->getUniqueName() : '';
        $cacheFilename  = Installer::BASE_PATH . Installer::CACHE_PATH . DIRECTORY_SEPARATOR;
        $cacheFilename .= md5('all_metadata' . get_class($this->metadataDAO) . $configName);

        if ($this->fileManager->isFile($cacheFilename) === true && $this->noCache === false) {
            $data = unserialize($this->fileManager->fileGetContent($cacheFilename));
        } else {
            $data = $this->metadataDAO->getAllMetadata();
            $this->fileManager->filePutsContent($cacheFilename, serialize($data));
        }

        return $data;
    }
1344076
public function getCurrentDirectoryContent()
    {
        $content = File::glob($this->currentDir . DIRECTORY_SEPARATOR . '*');

        $content = array_map(function ($item) {
            return (object) [
                'path' => $this->getPathRelativeToBaseDir($item),
                'name' => Str::substr(
                    $item,
                    Str::length($this->currentDir) + 1
                ),
                'isFile' => File::isFile($item),
                'isDir' => File::isDirectory($item),
            ];
        }, $content);

        return $content;
    }
384456
public function getAll()
    {
        $values = json_decode(file_get_contents($this->cacheFile), true);

        if ( ! is_null($values))
        {
            return $values;
        }

        return [];
    }
91664
public function getLogContent()
    {
        if ($this->getLogFile() && file_exists($this->getLogFile())) {
            return file_get_contents($this->getLogFile());
        } else {
            return null;
        }
    }
1115726
private function getRepositoryContent()
    {
        if ($this->contents === null) {
            $this->contents = $this->getRepositoryApi()->contents();
        }
        return $this->contents;
    }
325139
protected function getContents()
    {
        // Cancel if the file doesn't exist
        if (!$this->getFilesystem()->has($this->getFilepath())) {
            return [];
        }

        // Get and parse file
        if ($this->contents === null) {
            $this->contents = $this->getFilesystem()->read($this->getFilepath());
            $this->contents = json_decode($this->contents, true);
        }

        return (array) $this->contents;
    }
222552
public function getContent()
    {
        if ( $this->_render_completed )
        {
            return $this->_content;
        }

        foreach ( $this->_view_levels as $view_level )
        {
            if ( $view_level["is_disabled"] )
            {
                continue;
            }

            $this->_view_levels[$view_level["name"]]["is_disabled"] = true;

            if ( $view_level["cache_enabled"] != false )
            {
                $this->getCacheContent( $view_level );
                return;
            }

            include( $this->_views_dir . $view_level["file_name"] . ".phtml" );
            return;
        }
    }
935277
public function get_contents() {
        global $PAGE;
        if (!empty($this->properties->contents)) {
            if (!isset($this->properties->contentsformat)) {
                $this->properties->contentsformat = FORMAT_HTML;
            }
            $context = context_module::instance($PAGE->cm->id);
            $contents = file_rewrite_pluginfile_urls($this->properties->contents, 'pluginfile.php', $context->id, 'mod_lesson',
                                                     'page_contents', $this->properties->id);  // Must do this BEFORE format_text()!
            return format_text($contents, $this->properties->contentsformat,
                               array('context' => $context, 'noclean' => true,
                                     'overflowdiv' => true));  // Page edit is marked with XSS, we want all content here.
        } else {
            return '';
        }
    }