Bug 143348 - [WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
Summary: [WK2][NetworkCache] Drop HTTP method from NetworkCache::Key
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on: 143448
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-02 15:26 PDT by Chris Dumez
Modified: 2015-07-31 17:43 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.56 KB, patch)
2015-04-02 15:27 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff
Patch (6.30 KB, patch)
2015-07-31 16:42 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.