DescriptionLet prefetched resources skip cache revalidation once for a short duration by adding an "unused_since_prefetch" boolean to HttpResponseInfo and setting it when LOAD_PREFETCH is used on a new or existing entry.
The first read of a prefetched resource will skip validation if it is within 5 minutes and unset the "unused_since_prefetch" bit. Unsetting the bit requires writing metadata on a cache hit, which is a slight change to the state machine.
I also added a test clock to http_cache_unittests which makes testing easier.
BUG=383394
Committed: https://crrev.com/fb1d517f7bf920bf130abba2c6434381478790ff
Cr-Commit-Position: refs/heads/master@{#311046}
Patch Set 1 #Patch Set 2 : Cleaning up #
Total comments: 23
Patch Set 3 : Rebase #Patch Set 4 : Address comments from PS2 #
Total comments: 25
Patch Set 5 : Rebase #Patch Set 6 : Address comments from PS4 #
Total comments: 12
Patch Set 7 : Address comments from PS6 #Patch Set 8 : Test nits #
Total comments: 4
Patch Set 9 : Address comments from PS8 #
Messages
Total messages: 17 (4 generated)
|