From 88819def9d503006b7cba5bceba3cd20c44e96e4 Mon Sep 17 00:00:00 2001 From: Alexander Schranz Date: Tue, 23 Jul 2024 14:28:18 +0200 Subject: [PATCH] Add documentation about keepTtlheader and fallbackToSmaxage --- doc/symfony-cache-configuration.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/symfony-cache-configuration.rst b/doc/symfony-cache-configuration.rst index f08bc98a..96afaea8 100644 --- a/doc/symfony-cache-configuration.rst +++ b/doc/symfony-cache-configuration.rst @@ -356,6 +356,14 @@ but you can customize that in the listener constructor:: new CustomTtlListener('My-TTL-Header'); The custom header is removed before sending the response to the client. +You can enable keeping the custom header with the `keepTtlHeader` parameter:: + + new CustomTtlListener('My-TTL-Header', keepTtlHeader: true); + +By default if the custom ttl header is not found it will fallback to s-maxage. +To disable this behavior you can set the `fallbackToSmaxage` parameter to false:: + + new CustomTtlListener('My-TTL-Header', keepTtlHeader: true, fallbackToSmaxage: false); .. _symfony-cache x-debugging: