src/Command/CacheFlushCommand.php
private function clearCacheForBuiltInType($type)
    {
        if (!$this->getContainer()->hasParameter(sprintf('cache.%s', $type))) {
            return true;
        }

        $config = $this->getContainer()->getParameter(sprintf('cache.%s', $type));

        if ($type === 'doctrine') {
            $result = true;
            $result = $result && $this->clearTypedCacheFromService($type, $config['metadata']['service_id']);
            $result = $result && $this->clearTypedCacheFromService($type, $config['result']['service_id']);
            $result = $result && $this->clearTypedCacheFromService($type, $config['query']['service_id']);

            return $result;
        } else {
            return $this->clearTypedCacheFromService($type, $config['service_id']);
        }
    }
private function clearCacheForBuiltInType($type)
    {
        if (!$this->getContainer()->hasParameter(sprintf('cache.%s', $type))) {
            return true;
        }

        $config = $this->getContainer()->getParameter(sprintf('cache.%s', $type));

        if ($type === 'doctrine') {
            $result = true;
            $result = $result && $this->clearTypedCacheFromService($type, $config['metadata']['service_id']);
            $result = $result && $this->clearTypedCacheFromService($type, $config['result']['service_id']);
            $result = $result && $this->clearTypedCacheFromService($type, $config['query']['service_id']);

            return $result;
        } else {
            return $this->clearTypedCacheFromService($type, $config['service_id']);
        }
    }
private function clearCacheForBuiltInType ( $ type ) { if ( ! $ this -> getContainer ( ) -> hasParameter ( sprintf ( 'cache.%s' , $ type ) ) ) { return true ; } $ config = $ this -> getContainer ( ) -> getParameter ( sprintf ( 'cache.%s' , $ type ) ) ; if ( $ type === 'doctrine' ) { $ result = true ; $ result = $ result && $ this -> clearTypedCacheFromService ( $ type , $ config [ 'metadata' ] [ 'service_id' ] ) ; $ result = $ result && $ this -> clearTypedCacheFromService ( $ type , $ config [ 'result' ] [ 'service_id' ] ) ; $ result = $ result && $ this -> clearTypedCacheFromService ( $ type , $ config [ 'query' ] [ 'service_id' ] ) ; return $ result ; } else { return $ this -> clearTypedCacheFromService ( $ type , $ config [ 'service_id' ] ) ; } }
Clear the cache for a type.

@param string $type

@return bool
Clear the cache for a type .