Bug 143348

Summary: [WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cgarcia, commit-queue, koivisto
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 143448    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2015-04-02 15:26:17 PDT
Drop HTTP method from NetworkCache::Key as we only cache GET responses for now. Even when we start caching HEAD responses, we likely will not want the method to be part of the key because:
- A HEAD response can be used to update the headers of a previously cached response to GET
- A cached GET response may be used to satisfy subsequent HEAD requests
Comment 1 Chris Dumez 2015-04-02 15:27:58 PDT
Created attachment 250013 [details]
Patch
Comment 2 Antti Koivisto 2015-04-02 16:15:19 PDT
Comment on attachment 250013 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=250013&action=review

> Source/WebKit2/NetworkProcess/cache/NetworkCacheStorage.h:80
> -    static const unsigned version = 2;
> +    static const unsigned version = 3;

You shouldn't do this. The old entries will get cleaned during normal cache shrinks (and in an unlikely event of hash collision will fail to validate). Version updates are meant to be used when the directory structure changes and be paired with code that deletes the old directory structure.
Comment 3 Antti Koivisto 2015-04-02 16:19:20 PDT
It could be renamed to diskLayoutVersion or something similarly informative.
Comment 4 Chris Dumez 2015-04-02 16:20:30 PDT
Committed r182296: <http://trac.webkit.org/changeset/182296>
Comment 5 WebKit Commit Bot 2015-04-06 11:34:45 PDT
Re-opened since this is blocked by bug 143448
Comment 6 Chris Dumez 2015-07-31 16:42:10 PDT
Created attachment 257979 [details]
Patch
Comment 7 Chris Dumez 2015-07-31 16:42:40 PDT
We can land again now that efficacy logging has been disabled.
Comment 8 WebKit Commit Bot 2015-07-31 17:43:44 PDT
Comment on attachment 257979 [details]
Patch

Clearing flags on attachment: 257979

Committed r187698: <http://trac.webkit.org/changeset/187698>
Comment 9 WebKit Commit Bot 2015-07-31 17:43:49 PDT
All reviewed patches have been landed.  Closing bug.