-
Notifications
You must be signed in to change notification settings - Fork 43
Open
Labels
Description
In 3.0.0-RC4 https://github.com/dadi/cdn/pull/360/files the cache.cache404 was added to either enable to disable caching on 404 responses where a fallback asset is not provided.
This is a useful way to limit retries and avoid hanging, or make sure retries are guaranteed, but it's rather binary.
With a long cache TTL of 3600, a 404 will either cache for a full 10 minutes, or with cache404 set to false, potentially flood the request pool.
I propose adding a Negative Cache TTL - a concept used in DNS to tell the receiving service to cache for a shorter time if the record is not available.
cache.cache404 could be extended to be an object with a ttl parameter.