Closed danielealbano closed 1 year ago
Patch coverage: 68.42
% and project coverage change: +0.05
:tada:
Comparison is base (
078c235
) 77.95% compared to head (97bda05
) 77.99%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This PR implements a new functionality to allow the enforcment of the TTL via a default value, which, when enabled, is applied when the TTL is not set, and a max value, which, when enabled, limit the TTL to the max value if there is a ttl set.
The new config file properties are under an optional section named
enforced_ttl
and are nameddefault
andmax
, the properties are optional as well although one or the other has to be present for the YAML config file to be valid.The default ttl and max ttl properties support time units, so it's possible to write
7d
instead of604800
or1h
instead of3600
.Example with a default TTL set to 1d
Example with a max TTL set to 7d
If the parameters are not set cachegrand will behave normally as expected