RESOLVED WONTFIX 69705
[Soup] The Soup backend should communicate per-request cache preferences to the SoupCache
https://bugs.webkit.org/show_bug.cgi?id=69705
Summary [Soup] The Soup backend should communicate per-request cache preferences to t...
Martin Robinson
Reported 2011-10-08 11:35:27 PDT
Each request from WebKit land has a cache policy. The possible cache policies are defined in ResourceRequestBase.h. They are: enum ResourceRequestCachePolicy { UseProtocolCachePolicy, // normal load ReloadIgnoringCacheData, // reload ReturnCacheDataElseLoad, // back/forward or encoding change - allow stale data ReturnCacheDataDontLoad // results of a post - allow stale data and only use cache }; These map directly to NSURLRequestCachePolicy from Cocoa land: http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLRequest_Class/Reference/Reference.html In practical terms, this means that when a user in Epiphany holds shift and clicks the reload button, not only will the request skip in the in-memory cache, it will also skip the disk cache.
Attachments
Martin Robinson
Comment 1 2011-10-08 11:45:19 PDT
This requires changes to the SoupCache in libsoup. My initial idea for this API would be something like this: soup_cache_set_message_cache_policy(msg, SOUP_CACHE_POLICY_IGNORE_CACHE); The policy could be stored as a piece of data attached to the message or the SoupCache could keep an internal table of policies.
Martin Robinson
Comment 2 2011-10-08 11:49:45 PDT
The cache policy values also suggest that other disk cache implementations cache results of POST. Is this unusual? SoupCache only seems to cache GET requests.
Dan Winship
Comment 3 2011-10-08 12:33:59 PDT
(In reply to comment #1) > This requires changes to the SoupCache in libsoup. My initial idea for this API would be something like this: soup_cache_set_message_cache_policy(msg, SOUP_CACHE_POLICY_IGNORE_CACHE); I'd say soup_message_set_cache_policy(msg, policy) (and get_cache_policy(), and a gobject property)
Martin Robinson
Comment 4 2011-10-08 12:41:45 PDT
(In reply to comment #3) > (In reply to comment #1) > > This requires changes to the SoupCache in libsoup. My initial idea for this API would be something like this: soup_cache_set_message_cache_policy(msg, SOUP_CACHE_POLICY_IGNORE_CACHE); > > I'd say soup_message_set_cache_policy(msg, policy) (and get_cache_policy(), and a gobject property) I prefer your approach immensely, because it allows third-party features to access the property.
Michael Catanzaro
Comment 5 2016-03-10 06:26:48 PST
Obsolete, soup cache is only used by EFL nowadays, and we should change that.
Note You need to log in before you can comment on or make changes to this bug.