<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>69705</bug_id>
          
          <creation_ts>2011-10-08 11:35:27 -0700</creation_ts>
          <short_desc>[Soup] The Soup backend should communicate per-request cache preferences to the SoupCache</short_desc>
          <delta_ts>2016-03-10 06:26:48 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Martin Robinson">mrobinson</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>danw</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>svillar</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>480583</commentid>
    <comment_count>0</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-10-08 11:35:27 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>480586</commentid>
    <comment_count>1</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-10-08 11:45:19 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>480587</commentid>
    <comment_count>2</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-10-08 11:49:45 -0700</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>480592</commentid>
    <comment_count>3</comment_count>
    <who name="Dan Winship">danw</who>
    <bug_when>2011-10-08 12:33:59 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; 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&apos;d say soup_message_set_cache_policy(msg, policy) (and get_cache_policy(), and a gobject property)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>480595</commentid>
    <comment_count>4</comment_count>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-10-08 12:41:45 -0700</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #1)
&gt; &gt; 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);
&gt; 
&gt; I&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1173073</commentid>
    <comment_count>5</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-03-10 06:26:48 -0800</bug_when>
    <thetext>Obsolete, soup cache is only used by EFL nowadays, and we should change that.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>