At
|
async def add_cache_control_header(response, expiry = provider.utcnow() + timedelta(seconds=app.config['CACHE_TTL']['cloudflare'])): |
, the time being passed as a parameter will cause it to be evaluated at the time the function is defined, rather than on each call. The conventional way to do this would be to change the default value to
None and generate the value if it is set to None.
Fortunately, it seems that all calls to this function specify the expiry parameter, so it may not be causing any issues.
AB#3869