containsNoCacheTag example


    protected function lookup(Request $request$catch = false)
    {
        $response = parent::lookup($request$catch);

        // If Response is not fresh age > 0 AND contains a matching no cache tag         if ($response->getAge() > 0 && $this->containsNoCacheTag($request$response)) {
            $response = $this->fetch($request);
        }

        if (!$this->options['debug']) {
            // Hide headers from client             $response->headers->remove('x-shopware-allow-nocache');
            $response->headers->remove('x-shopware-cache-id');
        }

        return $response;
    }

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