Cache example

default:
                $cache = $this->createDefaultProvider($provider);
        }

        if ($cache instanceof CacheProvider) {
            $this->setCache($cache);
        }
    }

    public function setCacheResource(Zend_Cache_Core $cacheResource)
    {
        $cache = new Cache($cacheResource, 'Shopware_Models_' . $this->release->getRevision() . '_', [CacheManager::ITEM_TAG_MODELS]);

        $this->setCache($cache);
    }

    /** * @return Reader */
    public function getAnnotationsReader()
    {
        $reader = new AnnotationReader();
        $cache = $this->getMetadataCacheImpl();

        

    private CacheAttributeListener $listener;
    private Response $response;
    private Cache $cache;
    private Request $request;
    private ResponseEvent $event;

    protected function setUp(): void
    {
        $this->listener = new CacheAttributeListener();
        $this->response = new Response();
        $this->cache = new Cache();
        $this->request = $this->createRequest($this->cache);
        $this->event = $this->createEventMock($this->request, $this->response);
    }

    public function testWontReassignResponseWhenResponseIsUnsuccessful()
    {
        $response = $this->event->getResponse();

        $this->response->setStatusCode(500);

        $this->listener->onKernelResponse($this->event);

        
Home | Imprint | This part of the site doesn't use cookies.