Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Negative Cache TTL for failing requests #509

Open
mingard opened this issue Aug 20, 2019 · 0 comments
Open

Add Negative Cache TTL for failing requests #509

mingard opened this issue Aug 20, 2019 · 0 comments

Comments

@mingard
Copy link
Contributor

mingard commented Aug 20, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant