Description[CacheStorage] Sort QueryCache results by time entered into cache
The spec says that QueryCache should iterate the request/response pairs in
insertion order. The implementation backend (SimpleCache) has an unordered
iterator. This CL adds an insertion time to each entry (defaulting to response
time for pre-existing entries) and sorts QueryCache results before returning.
In order to sort the QueryCache results, I had to clean up "QueryCacheResults":
1) Rename QueryCacheResults -> QueryCacheContext
2) Create a QueryCacheResult which contains a matching request, response,
data handle, and entry time
3) QueryCache now returns a sorted std::vector<QueryCacheResult>
BUG=627821
Committed: https://crrev.com/92afbef3c43ccd4e0817d03a2166a98342a88d84
Cr-Commit-Position: refs/heads/master@{#417279}
Patch Set 1 #Patch Set 2 : Handle handling #Patch Set 3 : Verify ordering in layout tests #Patch Set 4 : Nits #Patch Set 5 : Rebase #
Total comments: 6
Patch Set 6 : Address comments from PS5 #Depends on Patchset: Messages
Total messages: 20 (14 generated)
|