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

Port AbstractUseStaleRequest #13

Open
jwadhams opened this issue Aug 19, 2024 · 0 comments
Open

Port AbstractUseStaleRequest #13

jwadhams opened this issue Aug 19, 2024 · 0 comments

Comments

@jwadhams
Copy link
Collaborator

We have a AbstractUseStaleRequest that uses the use-stale-while-revalidating pattern. The cached response is stored on a long timeout, with a shorter timeout that causes a Laravel queued job to make the request and overwrite the cache. This is a performance improvement (all upstream requests are served from cache, and the cache is updated asynchronously) and can also be used to cover for prolonged outages (e.g. try to refresh every day, but keep serving cached results for up to a week, or even indefinitely)

Port it into the public library.

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

No branches or pull requests

1 participant