Skip to content

Commit

Permalink
Add documentation about keepTtlheader and fallbackToSmaxage
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jul 23, 2024
1 parent ad95e38 commit 88819de
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions doc/symfony-cache-configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down

0 comments on commit 88819de

Please sign in to comment.