From bc3874c862fb127c073b7f78a89b582cb8917edc Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Mon, 22 Jul 2024 16:53:47 +0200 Subject: [PATCH] Set CustomTtlListener cache life time --- tests/Functional/Fixtures/Symfony/AppKernel.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Functional/Fixtures/Symfony/AppKernel.php b/tests/Functional/Fixtures/Symfony/AppKernel.php index 1e606b5b..9582414d 100644 --- a/tests/Functional/Fixtures/Symfony/AppKernel.php +++ b/tests/Functional/Fixtures/Symfony/AppKernel.php @@ -31,18 +31,21 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ case '/cache': $response = new Response(microtime(true)); $response->setCache(['max_age' => 3600, 'public' => true]); + $response->headers->set('X-Reverse-Proxy-TTL', '3600'); return $response; case '/tags': $response = new Response(microtime(true)); $response->setCache(['max_age' => 3600, 'public' => true]); $response->headers->set('X-Cache-Tags', 'tag1,tag2'); + $response->headers->set('X-Reverse-Proxy-TTL', '3600'); return $response; case '/tags_multi_header': $response = new Response(microtime(true)); $response->setCache(['max_age' => 3600, 'public' => true]); $response->headers->set('X-Cache-Tags', ['tag1', 'tag2']); + $response->headers->set('X-Reverse-Proxy-TTL', '3600'); return $response; case '/negotiation': @@ -50,6 +53,7 @@ public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQ $response->setCache(['max_age' => 3600, 'public' => true]); $response->headers->set('Content-Type', $request->headers->get('Accept')); $response->setVary('Accept'); + $response->headers->set('X-Reverse-Proxy-TTL', '3600'); return $response; }