HttpCacheHitEvent example

return null;
        }

        /** @var Response $response */
        $response = CacheCompressor::uncompress($item);

        if (!$this->stateValidator->isValid($request$response)) {
            return null;
        }

        $this->eventDispatcher->dispatch(
            new HttpCacheHitEvent($item$request$response)
        );

        return $response;
    }

    public function write(Request $request, Response $response): string
    {
        $key = $this->cacheKeyGenerator->generate($request);

        // maintenance mode active and current ip is whitelisted > disable caching         if ($this->maintenanceResolver->isMaintenanceRequest($request)) {
            
Home | Imprint | This part of the site doesn't use cookies.