I was trying to look for docs and libraries about a cache akin to RFC 5861 where objects can be in three age states, fresh and expired (as usual), and a third where it can be returned immediately (as though fresh), but asynchronously checked (as though expired).
Is this a named pattern? What should be searching for to find literature on this outside of the HTTP realm?
A response containing:
Cache-Control: max-age=600, stale-while-revalidate=30
indicates that it is fresh for 600 seconds, and it may continue to be served stale for up to an additional 30 seconds while an asynchronous validation is attempted. If validation is inconclusive, or if there is not traffic that triggers it, after 30 seconds the stale-while-revalidate function will cease to operate, and the cached response will be "truly" stale (i.e., the next request will block and be handled normally).