trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpe...@apache.org
Subject [3/6] trafficserver git commit: TS-3580: Apply the cache generation number in Cache Pages
Date Mon, 15 Jun 2015 16:28:08 GMT
TS-3580: Apply the cache generation number in Cache Pages


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/4d7d892f
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/4d7d892f
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/4d7d892f

Branch: refs/heads/master
Commit: 4d7d892febbf475312ab4517b884426c2c70f589
Parents: 9f71421
Author: James Peach <jpeach@apache.org>
Authored: Mon May 4 20:25:23 2015 -0700
Committer: James Peach <jpeach@apache.org>
Committed: Mon Jun 15 09:16:00 2015 -0700

----------------------------------------------------------------------
 iocore/cache/CachePages.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4d7d892f/iocore/cache/CachePages.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CachePages.cc b/iocore/cache/CachePages.cc
index 721bffc..b850f0b 100644
--- a/iocore/cache/CachePages.cc
+++ b/iocore/cache/CachePages.cc
@@ -431,6 +431,8 @@ int
 ShowCache::lookup_url(int event, Event *e)
 {
   char header_str[300];
+  HttpCacheKey key;
+  cache_generation_t generation = -1;
 
   snprintf(header_str, sizeof(header_str), "<font color=red>%s</font>", show_cache_urlstrs[0]);
   CHECK_SHOW(begin(header_str));
@@ -439,8 +441,8 @@ ShowCache::lookup_url(int event, Event *e)
   s = show_cache_urlstrs[0];
   url.parse(&s, s + strlen(s));
 
-  HttpCacheKey key;
-  Cache::generate_key(&key, &url); // XXX choose a cache generation number ...
+  RecGetRecordInt("proxy.config.http.cache.generation", &generation);
+  Cache::generate_key(&key, &url, generation);
 
   SET_HANDLER(&ShowCache::handleCacheEvent);
   Action *lookup_result =


Mime
View raw message