July 2018
Intermediate to advanced
354 pages
8h 51m
English
Another interesting caching pattern, of the variation of the cache falling back to the network pattern, is a cache and network race pattern. This is where you will simultaneously request the resource from the cache and the network. The fastest response wins. While the cache should be the winner, it may not always win. This pattern also gives you the opportunity to retrieve the network version a little bit faster if there is no cached version. The following image shows the interactions involved in this process:

The drawback to this pattern is that you will always make a network request even if it's not needed. This will ...
Read now
Unlock full access