There are problems with the approach you described.
First of all, it does take two queries, one to the cache and one to the master.
(BTW, If the cache is being used as a firewall, then recourse to the master is
Second, it does not deal with the situation I am describing: when the user
wants recent, but not necessarily the latest information.
The approach which I am suggesting, that the master server put in a
snapshot-date: <date> header line would solve all of this.
If the user/client wants the latest and greatest, it simply uses
pragma no-cache otherwise if can grab the header from the cache and
see whether the cached version is new enough. If it is, then a cached
GET is performed, otherwise the pragma no-cache is used and the cache
is refreshed and the user gets the latest version.