Retrieves the cache data.
@return \React\Promise\ExtendedPromiseInterface
186333
protected function get() {
        return $this->cache->get('yasmin-ratelimiter-'.$this->endpoint, null, true)->then(null, function () {
            return array('limit' => 0, 'remaining' => 0, 'resetTime' => null);
        });
    }
890811
public function fetchConfig()
    {
        if (Cache::has($this->getCacheKey())) {
            return Cache::get($this->getCacheKey());
        }

        return null;
    }
288242
public function getResultCacheDriver()
    {
        if (!$this->resultCacheDriver instanceof CacheProvider) {
            $this->resultCacheDriver = $this->getCacheDriver(
                (string) $this->getOption('result_cache_namespace'),
                $this->getOption('result_cache_driver')
            );
        }

        return $this->resultCacheDriver;
    }
1180148
public function getCache() {
        if (!file_exists($this->_fileName)) {
            $this->setCache();
        }

        return unserialize(($this->_uncompress(file_get_contents($this->_fileName))));
    }
695559
public function getData()
    {
        if (!Cache::has($this->cacheKey)) {
            $this->refreshCache();
        }

        return Cache::get($this->cacheKey);
    }
365259
public function getCache()
    {
        try {
            $handle = $this->handle;
            $result = $handle->prepare(
                'SELECT * FROM `' .
                $this->config['table'] .
                '` where type=?'
            );
            $result->execute(array($this->type));

            foreach ($result as $row) {
                return unserialize($row['data']);
            }

        } catch (\PDOException $e) {
            throw new \PDOException('PDOException: ' . $e->getMessage());
        }

        return false;
    }
1106671
public function getResultCacheDriver()
    {
        if ($this->queryCacheProfile && $this->queryCacheProfile->getResultCacheDriver()) {
            return $this->queryCacheProfile->getResultCacheDriver();
        }

        return $this->em->getConfiguration()->getResultCacheImpl();
    }
1286337
public function cache()
    {
        $this->cache->remember($this->getCacheKey(), $this->getCacheLifetime(), function () {
            return $this->scan();
        });
    }
579352
public function getData()
    {
        if ($this->_cache === null) {
            $this->_cache = $this->asArray(); // Throws.
        }

        if ($this->_type !== null) {
            foreach ($this->_cache as &$value) {
                if (is_array($value)) {
                    $value = new $this->_type($value); // Throws.
                }
            }
        }

        return $this->_cache;
    }
988375
public function getCache()
    {
        if (null == $this->cache) {
            $this->setCache(Cache::get(Cache::CACHE_MEMORY));
        }
        return $this->cache;
    }
1097354
public final function getFinalCache() {
        $resource = $this;
        while (true) {
            $cache_file = $this->getParentProject()->getCacheManager()->getCacheBuilt($resource);
            if (\is_null($cache_file) ||
                    \is_null($this->getParentProject()->getResourceByFile($cache_file)) ||
                    $this->getParentProject()->getResourceByFile($cache_file)->getMemberId() === $resource->getMemberId()
            ) {
                return $resource;
            }
            $resource = $this->getParentProject()->getResourceByFile($cache_file);
        }
    }
215241
public function getData()
    {
        $serviceRoute = $this->requestStack->getCurrentRequest()
                                           ->get('service');

        // Locate the model definition
        $model = $this->getAnalyticModel($serviceRoute);

        $cacheTime = $model->getCacheTime();
        $cacheKey = $this->getCacheKey($model);

        //Cached data if configured
        if ($cacheTime &&
            !$this->requestStack->getCurrentRequest()->headers->has($this->skipCacheHeaderName) &&
            $cache = $this->cacheProvider->fetch($cacheKey)
        ) {
            return $cache;
        }

        $data = $this->analyticsManager->getData($model, $this->getServiceParameters($model));

        if ($cacheTime) {
            $this->cacheProvider->save($cacheKey, $data, $cacheTime);
        }

        return $data;
    }
978065
public function getCachedContent()
    {
        if ($this->_content !== null) {
            return $this->_content;
        }

        $this->_content = false;

        if (!($this->cache instanceof CacheInterface)) {
            return $this->_content;
        }

        $key = $this->calculateKey();
        $data = $this->cache->get($key);
        if (!is_array($data) || count($data) !== 2) {
            return $this->_content;
        }

        [$this->_content, $placeholders] = $data;
        if (!is_array($placeholders) || count($placeholders) === 0) {
            return $this->_content;
        }

        $this->_content = $this->updateDynamicContent($this->_content, $placeholders, true);

        return $this->_content;
    }
1179888
public function theFunction()
    {
        $futureResult = new \React\Promise\Deferred();

        $this->session->call('com.example.thefunction' . ($this->number + 1), [])
            ->then(function ($res) use ($futureResult) {
                if (is_scalar($res[0])) {
                    $res[0] = $res[0] . ".";
                }
                $futureResult->resolve($res[0]);
            });

        return $futureResult->promise();
    }
206761
public function save()
    {
        $deferred = new Deferred();

        $this->http->patch('users/@me', $this->getUpdatableAttributes())->then(
            \React\Partial\bind_right($this->resolve, $deferred),
            \React\Partial\bind_right($this->reject, $deferred)
        );

        return $deferred->promise();
    }
892277
private function getCache()
    {
        // cache for single run
        // so that getLastModified and getContent in single request do not add additional cache roundtrips (i.e memcache)
        if (isset($this->parsed)) {
            return $this->parsed;
        }

        // check from cache first
        $cache = null;
        $cacheId = $this->getCacheId();
        if ($this->cache->isValid($cacheId, 0)) {
            if ($cache = $this->cache->fetch($cacheId)) {
                $cache = unserialize($cache);
            }
        }

        $input = $cache ? $cache : $this->filepath;

        if ($this->cacheIsStale($cache)) {
            $cache = $this->compile($this->filepath);
        }

        if (!is_array($input) || $cache['updated'] > $input['updated']) {
            $this->cache->store($cacheId, serialize($cache));
        }

        return $this->parsed = $cache;
    }
914803
public function getCache()
    {

        if ($this->type && $_SESSION['PHPIDS'][$this->type]) {
            return $_SESSION['PHPIDS'][$this->type];
        }

        return false;
    }