This repository was archived by the owner on Jun 23, 2025. It is now read-only.

Description
Currently when the cache is expired (every 15 sec), unleash needs to repopulate it.
In our case this causes a 200-300 ms delay on the total request.
Also on high traffic websites its possible that multiple users are making the same request at (almost) the same time.
I've tested with a simple mechanism that sets an "expires_at" timestamp, and a few seconds before the timestamp is reached it will refresh the cache with new data.
Because the refresh happens in the __destruct(), the user that triggers the refresh does not notice any delays.
Would you accept a PR for such a mechanism?