diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-24 18:20:06 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-24 18:20:06 +0000 |
commit | 96bac982eb0d93f254c9f14e918fd0ed8199cd0c (patch) | |
tree | e785449a633d957b361f5c18a67b718b6fee0086 /net/http/http_cache.h | |
parent | e483fab5431c144a5413b4d4e9abcce48d8cfa57 (diff) | |
download | chromium_src-96bac982eb0d93f254c9f14e918fd0ed8199cd0c.zip chromium_src-96bac982eb0d93f254c9f14e918fd0ed8199cd0c.tar.gz chromium_src-96bac982eb0d93f254c9f14e918fd0ed8199cd0c.tar.bz2 |
Net module changes to support caching responses to a POST request.
The solution is to add a user-defined identifier to UploadData. If that identifier is set, and if the request method is POST, then HttpCache will enable caching for the response. (The cache key will be a composition of the identifier and the URL.) A subsequent POST request to the same URL with the same identifier will "hit" the previously generated cache entry. Reuse from the cache is subject to all of the standard rules.
BUG=2636
R=wtc
Review URL: http://codereview.chromium.org/52028
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12374 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_cache.h')
-rw-r--r-- | net/http/http_cache.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/http/http_cache.h b/net/http/http_cache.h index 297c8d5..eb47b44 100644 --- a/net/http/http_cache.h +++ b/net/http/http_cache.h @@ -106,9 +106,6 @@ class HttpCache : public HttpTransactionFactory { const HttpResponseInfo* response_info, bool skip_transient_headers); - // Generate a key that can be used inside the cache. - std::string GenerateCacheKey(const HttpRequestInfo* request); - // Get/Set the cache's mode. void set_mode(Mode value) { mode_ = value; } Mode mode() { return mode_; } @@ -143,6 +140,7 @@ class HttpCache : public HttpTransactionFactory { // Methods ------------------------------------------------------------------ + std::string GenerateCacheKey(const HttpRequestInfo*); void DoomEntry(const std::string& key); void FinalizeDoomedEntry(ActiveEntry* entry); ActiveEntry* FindActiveEntry(const std::string& key); |