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
Bulk up the unit test on stale-while-revalidating's relationship with cache. This isn't really a functionality change, but it does save a whole call to the parent that we know can't succeed.
Fixes support for PHP 8.4, and adds a getCacheTags method that simplifies the way we use AbstractUseStaleRequest along side cache tags (if you consider the cacheTags property to be state when it's really a process the code is twice as complex)
Adds support for Use-Stale-While-Revalidating pattern!
This request class type has two cache timeouts:
a short one indicates when it's time to start a background process to re-download the data.
a long one holds on to a known good result for a maximum hold time (including "forever")
When a request happens after the refreshCacheKey expires, we return the responseFromCache and defer a job to run this request that will not read from cache but will write to cache. This way, all callers are served in the much faster cached response time, but results are still routinely updated behind the scenes.
This release updates the ParseResponseJSONSchemaOrThrow trait to better reflect schema validation for empty objects to avoid {} vs [] confusion using the new validateEncodedStringOrThrow method provided by Carsdotcom\JsonSchemaValidation. This release also drops support for older versions of that library.