You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice to have an option to refresh some stale caches in the background. With such mechanism, middleware could increment the overall application performance.
At least stale-while-revalidate directive explicitly says about revalidating of responses in the background.
Beyond that, we could invent an explicit way to manage refreshable caches. For example:
Make a request:
// Possible way to mark a request as refreshable — add 'refreshable' to its config$client = newClient($config + ['refreshable' => true]);
$client->get('https://example.com/resource');
Then, run as a scheduled job:
// Possible way to select requests for refreshing — filter caches with method/url$magic->revalidateStaled(['https://example.com/']);
If @Kevinrob says this is possible and reasonble — I could try to make a PR?
The text was updated successfully, but these errors were encountered:
It would be nice to have an option to refresh some stale caches in the background. With such mechanism, middleware could increment the overall application performance.
At least
stale-while-revalidate
directive explicitly says about revalidating of responses in the background.Beyond that, we could invent an explicit way to manage refreshable caches. For example:
Make a request:
Then, run as a scheduled job:
If @Kevinrob says this is possible and reasonble — I could try to make a PR?
The text was updated successfully, but these errors were encountered: