You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by jp...@apache.org on 2015/05/04 21:08:26 UTC
trafficserver git commit: Pass const cache keys around the lower
cache layers
Repository: trafficserver
Updated Branches:
refs/heads/master 0eb34ce6a -> bfa3ff44d
Pass const cache keys around the lower cache layers
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/bfa3ff44
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/bfa3ff44
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/bfa3ff44
Branch: refs/heads/master
Commit: bfa3ff44dfa306134cbccf8c7160c0945ba5a5a4
Parents: 0eb34ce
Author: James Peach <jp...@apache.org>
Authored: Mon May 4 12:08:15 2015 -0700
Committer: James Peach <jp...@apache.org>
Committed: Mon May 4 12:08:15 2015 -0700
----------------------------------------------------------------------
iocore/cache/Cache.cc | 8 ++++----
iocore/cache/CacheDir.cc | 20 ++++++++++----------
iocore/cache/CacheLink.cc | 4 ++--
iocore/cache/CacheRead.cc | 6 +++---
iocore/cache/CacheVol.cc | 4 ++--
iocore/cache/CacheWrite.cc | 6 +++---
iocore/cache/P_CacheDir.h | 22 +++++++++++-----------
iocore/cache/P_CacheInternal.h | 32 ++++++++++++++++----------------
iocore/cache/P_CacheVol.h | 4 ++--
iocore/cache/P_RamCache.h | 2 +-
iocore/cache/RamCacheCLFUS.cc | 4 ++--
iocore/cache/RamCacheLRU.cc | 4 ++--
12 files changed, 58 insertions(+), 58 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/Cache.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index f41e027..e98133f 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -2982,7 +2982,7 @@ LmemHit:
}
Action *
-Cache::lookup(Continuation *cont, CacheKey *key, CacheFragType type, char const *hostname, int host_len)
+Cache::lookup(Continuation *cont, const CacheKey *key, CacheFragType type, char const *hostname, int host_len)
{
if (!CacheProcessor::IsCacheReady(type)) {
cont->handleEvent(CACHE_EVENT_LOOKUP_FAILED, 0);
@@ -3102,8 +3102,8 @@ Lfree:
}
Action *
-Cache::remove(Continuation *cont, CacheKey *key, CacheFragType type, bool /* user_agents ATS_UNUSED */, bool /* link ATS_UNUSED */,
- char *hostname, int host_len)
+Cache::remove(Continuation *cont, const CacheKey *key, CacheFragType type, bool /* user_agents ATS_UNUSED */, bool /* link ATS_UNUSED */,
+ const char *hostname, int host_len)
{
if (!CacheProcessor::IsCacheReady(type)) {
if (cont)
@@ -3580,7 +3580,7 @@ rebuild_host_table(Cache *cache)
// if generic_host_rec.vols == NULL, what do we do???
Vol *
-Cache::key_to_vol(CacheKey *key, char const *hostname, int host_len)
+Cache::key_to_vol(const CacheKey *key, char const *hostname, int host_len)
{
uint32_t h = (key->slice32(2) >> DIR_TAG_WIDTH) % VOL_HASH_TABLE_SIZE;
unsigned short *hash_table = hosttable->gen_host_rec.vol_hash_table;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/CacheDir.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheDir.cc b/iocore/cache/CacheDir.cc
index ec2de8f..3a7b9c4 100644
--- a/iocore/cache/CacheDir.cc
+++ b/iocore/cache/CacheDir.cc
@@ -148,7 +148,7 @@ OpenDir::close_write(CacheVC *cont)
}
OpenDirEntry *
-OpenDir::open_read(INK_MD5 *key)
+OpenDir::open_read(const CryptoHash *key)
{
unsigned int h = key->slice32(0);
int b = h % OPEN_DIR_BUCKETS;
@@ -593,7 +593,7 @@ dir_free_entry(Dir *e, int s, Vol *d)
}
int
-dir_probe(CacheKey *key, Vol *d, Dir *result, Dir **last_collision)
+dir_probe(const CacheKey *key, Vol *d, Dir *result, Dir **last_collision)
{
ink_assert(d->mutex->thread_holding == this_ethread());
int s = key->slice32(0) % d->segments;
@@ -660,7 +660,7 @@ Lagain:
}
int
-dir_insert(CacheKey *key, Vol *d, Dir *to_part)
+dir_insert(const CacheKey *key, Vol *d, Dir *to_part)
{
ink_assert(d->mutex->thread_holding == this_ethread());
int s = key->slice32(0) % d->segments, l;
@@ -721,7 +721,7 @@ Lfill:
}
int
-dir_overwrite(CacheKey *key, Vol *d, Dir *dir, Dir *overwrite, bool must_overwrite)
+dir_overwrite(const CacheKey *key, Vol *d, Dir *dir, Dir *overwrite, bool must_overwrite)
{
ink_assert(d->mutex->thread_holding == this_ethread());
int s = key->slice32(0) % d->segments, l;
@@ -797,7 +797,7 @@ Lfill:
}
int
-dir_delete(CacheKey *key, Vol *d, Dir *del)
+dir_delete(const CacheKey *key, Vol *d, Dir *del)
{
ink_assert(d->mutex->thread_holding == this_ethread());
int s = key->slice32(0) % d->segments;
@@ -840,7 +840,7 @@ dir_delete(CacheKey *key, Vol *d, Dir *del)
// Lookaside Cache
int
-dir_lookaside_probe(CacheKey *key, Vol *d, Dir *result, EvacuationBlock **eblock)
+dir_lookaside_probe(const CacheKey *key, Vol *d, Dir *result, EvacuationBlock **eblock)
{
ink_assert(d->mutex->thread_holding == this_ethread());
int i = key->slice32(3) % LOOKASIDE_SIZE;
@@ -881,7 +881,7 @@ dir_lookaside_insert(EvacuationBlock *eblock, Vol *d, Dir *to)
}
int
-dir_lookaside_fixup(CacheKey *key, Vol *d)
+dir_lookaside_fixup(const CacheKey *key, Vol *d)
{
ink_assert(d->mutex->thread_holding == this_ethread());
int i = key->slice32(3) % LOOKASIDE_SIZE;
@@ -932,7 +932,7 @@ dir_lookaside_cleanup(Vol *d)
}
void
-dir_lookaside_remove(CacheKey *key, Vol *d)
+dir_lookaside_remove(const CacheKey *key, Vol *d)
{
ink_assert(d->mutex->thread_holding == this_ethread());
int i = key->slice32(3) % LOOKASIDE_SIZE;
@@ -1429,8 +1429,8 @@ regress_rand_init(unsigned int i)
regress_rand_seed = i;
}
-void
-regress_rand_CacheKey(CacheKey *key)
+static void
+regress_rand_CacheKey(const CacheKey *key)
{
unsigned int *x = (unsigned int *)key;
for (int i = 0; i < 4; i++)
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/CacheLink.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheLink.cc b/iocore/cache/CacheLink.cc
index feb3846..5189563 100644
--- a/iocore/cache/CacheLink.cc
+++ b/iocore/cache/CacheLink.cc
@@ -24,7 +24,7 @@
#include "P_Cache.h"
Action *
-Cache::link(Continuation *cont, CacheKey *from, CacheKey *to, CacheFragType type, char *hostname, int host_len)
+Cache::link(Continuation *cont, const CacheKey *from, const CacheKey *to, CacheFragType type, const char *hostname, int host_len)
{
if (!CacheProcessor::IsCacheReady(type)) {
cont->handleEvent(CACHE_EVENT_LINK_FAILED, 0);
@@ -71,7 +71,7 @@ Ldone:
}
Action *
-Cache::deref(Continuation *cont, CacheKey *key, CacheFragType type, char *hostname, int host_len)
+Cache::deref(Continuation *cont, const CacheKey *key, CacheFragType type, const char *hostname, int host_len)
{
if (!CacheProcessor::IsCacheReady(type)) {
cont->handleEvent(CACHE_EVENT_DEREF_FAILED, 0);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/CacheRead.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheRead.cc b/iocore/cache/CacheRead.cc
index 4ba02f4..38ce268 100644
--- a/iocore/cache/CacheRead.cc
+++ b/iocore/cache/CacheRead.cc
@@ -31,7 +31,7 @@
extern int cache_config_compatibility_4_2_0_fixup;
Action *
-Cache::open_read(Continuation *cont, CacheKey *key, CacheFragType type, char *hostname, int host_len)
+Cache::open_read(Continuation *cont, const CacheKey *key, CacheFragType type, const char *hostname, int host_len)
{
if (!CacheProcessor::IsCacheReady(type)) {
cont->handleEvent(CACHE_EVENT_OPEN_READ_FAILED, (void *)-ECACHE_NOT_READY);
@@ -93,8 +93,8 @@ Lcallreturn:
#ifdef HTTP_CACHE
Action *
-Cache::open_read(Continuation *cont, CacheKey *key, CacheHTTPHdr *request, CacheLookupHttpConfig *params, CacheFragType type,
- char *hostname, int host_len)
+Cache::open_read(Continuation *cont, const CacheKey *key, CacheHTTPHdr *request, CacheLookupHttpConfig *params, CacheFragType type,
+ const char *hostname, int host_len)
{
if (!CacheProcessor::IsCacheReady(type)) {
cont->handleEvent(CACHE_EVENT_OPEN_READ_FAILED, (void *)-ECACHE_NOT_READY);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/CacheVol.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheVol.cc b/iocore/cache/CacheVol.cc
index 47f5775..daf9fab 100644
--- a/iocore/cache/CacheVol.cc
+++ b/iocore/cache/CacheVol.cc
@@ -28,7 +28,7 @@
#define SCAN_WRITER_LOCK_MAX_RETRY 5
Action *
-Cache::scan(Continuation *cont, char *hostname, int host_len, int KB_per_second)
+Cache::scan(Continuation *cont, const char *hostname, int host_len, int KB_per_second)
{
Debug("cache_scan_truss", "inside scan");
if (!CacheProcessor::IsCacheReady(CACHE_FRAG_TYPE_HTTP)) {
@@ -39,7 +39,7 @@ Cache::scan(Continuation *cont, char *hostname, int host_len, int KB_per_second)
CacheVC *c = new_CacheVC(cont);
c->vol = NULL;
/* do we need to make a copy */
- c->hostname = hostname;
+ c->hostname = const_cast<char *>(hostname);
c->host_len = host_len;
c->base_stat = cache_scan_active_stat;
c->buf = new_IOBufferData(BUFFER_SIZE_FOR_XMALLOC(SCAN_BUF_SIZE), MEMALIGNED);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/CacheWrite.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/CacheWrite.cc b/iocore/cache/CacheWrite.cc
index 4e6319e..afff938 100644
--- a/iocore/cache/CacheWrite.cc
+++ b/iocore/cache/CacheWrite.cc
@@ -1605,7 +1605,7 @@ CacheVC::openWriteStartBegin(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED
// main entry point for writing of of non-http documents
Action *
-Cache::open_write(Continuation *cont, CacheKey *key, CacheFragType frag_type, int options, time_t apin_in_cache, char *hostname,
+Cache::open_write(Continuation *cont, const CacheKey *key, CacheFragType frag_type, int options, time_t apin_in_cache, const char *hostname,
int host_len)
{
if (!CacheProcessor::IsCacheReady(frag_type)) {
@@ -1673,8 +1673,8 @@ Cache::open_write(Continuation *cont, CacheKey *key, CacheFragType frag_type, in
#ifdef HTTP_CACHE
// main entry point for writing of http documents
Action *
-Cache::open_write(Continuation *cont, CacheKey *key, CacheHTTPInfo *info, time_t apin_in_cache, CacheKey * /* key1 ATS_UNUSED */,
- CacheFragType type, char *hostname, int host_len)
+Cache::open_write(Continuation *cont, const CacheKey *key, CacheHTTPInfo *info, time_t apin_in_cache, const CacheKey * /* key1 ATS_UNUSED */,
+ CacheFragType type, const char *hostname, int host_len)
{
if (!CacheProcessor::IsCacheReady(type)) {
cont->handleEvent(CACHE_EVENT_OPEN_WRITE_FAILED, (void *)-ECACHE_NOT_READY);
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/P_CacheDir.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheDir.h b/iocore/cache/P_CacheDir.h
index a4aef0c..268ecfb 100644
--- a/iocore/cache/P_CacheDir.h
+++ b/iocore/cache/P_CacheDir.h
@@ -285,7 +285,7 @@ struct OpenDir : public Continuation {
int open_write(CacheVC *c, int allow_if_writers, int max_writers);
int close_write(CacheVC *c);
- OpenDirEntry *open_read(CryptoHash *key);
+ OpenDirEntry *open_read(const CryptoHash *key);
int signal_readers(int event, Event *e);
OpenDir();
@@ -311,16 +311,16 @@ struct CacheSync : public Continuation {
// Global Functions
void vol_init_dir(Vol *d);
-int dir_token_probe(CacheKey *, Vol *, Dir *);
-int dir_probe(CacheKey *, Vol *, Dir *, Dir **);
-int dir_insert(CacheKey *key, Vol *d, Dir *to_part);
-int dir_overwrite(CacheKey *key, Vol *d, Dir *to_part, Dir *overwrite, bool must_overwrite = true);
-int dir_delete(CacheKey *key, Vol *d, Dir *del);
-int dir_lookaside_probe(CacheKey *key, Vol *d, Dir *result, EvacuationBlock **eblock);
+int dir_token_probe(const CacheKey *, Vol *, Dir *);
+int dir_probe(const CacheKey *, Vol *, Dir *, Dir **);
+int dir_insert(const CacheKey *key, Vol *d, Dir *to_part);
+int dir_overwrite(const CacheKey *key, Vol *d, Dir *to_part, Dir *overwrite, bool must_overwrite = true);
+int dir_delete(const CacheKey *key, Vol *d, Dir *del);
+int dir_lookaside_probe(const CacheKey *key, Vol *d, Dir *result, EvacuationBlock **eblock);
int dir_lookaside_insert(EvacuationBlock *b, Vol *d, Dir *to);
-int dir_lookaside_fixup(CacheKey *key, Vol *d);
+int dir_lookaside_fixup(const CacheKey *key, Vol *d);
void dir_lookaside_cleanup(Vol *d);
-void dir_lookaside_remove(CacheKey *key, Vol *d);
+void dir_lookaside_remove(const CacheKey *key, Vol *d);
void dir_free_entry(Dir *e, int s, Vol *d);
void dir_sync_init();
int check_dir(Vol *d);
@@ -340,7 +340,7 @@ extern Dir empty_dir;
#define dir_in_seg(_s, _i) ((Dir *)(((char *)(_s)) + (SIZEOF_DIR * (_i))))
TS_INLINE bool
-dir_compare_tag(Dir *e, CacheKey *key)
+dir_compare_tag(const Dir *e, const CacheKey *key)
{
return (dir_tag(e) == DIR_MASK_TAG(key->slice32(2)));
}
@@ -364,7 +364,7 @@ next_dir(Dir *d, Dir *seg)
return dir_from_offset(i, seg);
}
TS_INLINE int64_t
-dir_to_offset(Dir *d, Dir *seg)
+dir_to_offset(const Dir *d, const Dir *seg)
{
#if DIR_DEPTH < 5
return (((char *)d) - ((char *)seg)) / SIZEOF_DIR;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/P_CacheInternal.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheInternal.h b/iocore/cache/P_CacheInternal.h
index dadeffe..ffec51a 100644
--- a/iocore/cache/P_CacheInternal.h
+++ b/iocore/cache/P_CacheInternal.h
@@ -1023,34 +1023,34 @@ struct Cache {
int open(bool reconfigure, bool fix);
int close();
- Action *lookup(Continuation *cont, CacheKey *key, CacheFragType type, char const *hostname, int host_len);
- inkcoreapi Action *open_read(Continuation *cont, CacheKey *key, CacheFragType type, char *hostname, int len);
- inkcoreapi Action *open_write(Continuation *cont, CacheKey *key, CacheFragType frag_type, int options = 0,
- time_t pin_in_cache = (time_t)0, char *hostname = 0, int host_len = 0);
- inkcoreapi Action *remove(Continuation *cont, CacheKey *key, CacheFragType type = CACHE_FRAG_TYPE_HTTP, bool user_agents = true,
- bool link = false, char *hostname = 0, int host_len = 0);
- Action *scan(Continuation *cont, char *hostname = 0, int host_len = 0, int KB_per_second = 2500);
+ Action *lookup(Continuation *cont, const CacheKey *key, CacheFragType type, const char *hostname, int host_len);
+ inkcoreapi Action *open_read(Continuation *cont, const CacheKey *key, CacheFragType type, const char *hostname, int len);
+ inkcoreapi Action *open_write(Continuation *cont, const CacheKey *key, CacheFragType frag_type, int options = 0,
+ time_t pin_in_cache = (time_t)0, const char *hostname = 0, int host_len = 0);
+ inkcoreapi Action *remove(Continuation *cont, const CacheKey *key, CacheFragType type = CACHE_FRAG_TYPE_HTTP, bool user_agents = true,
+ bool link = false, const char *hostname = 0, int host_len = 0);
+ Action *scan(Continuation *cont, const char *hostname = 0, int host_len = 0, int KB_per_second = 2500);
#ifdef HTTP_CACHE
Action *lookup(Continuation *cont, URL *url, CacheFragType type);
- inkcoreapi Action *open_read(Continuation *cont, CacheKey *key, CacheHTTPHdr *request, CacheLookupHttpConfig *params,
- CacheFragType type, char *hostname, int host_len);
+ inkcoreapi Action *open_read(Continuation *cont, const CacheKey *key, CacheHTTPHdr *request, CacheLookupHttpConfig *params,
+ CacheFragType type, const char *hostname, int host_len);
Action *open_read(Continuation *cont, URL *url, CacheHTTPHdr *request, CacheLookupHttpConfig *params, CacheFragType type);
- Action *open_write(Continuation *cont, CacheKey *key, CacheHTTPInfo *old_info, time_t pin_in_cache = (time_t)0,
- CacheKey *key1 = NULL, CacheFragType type = CACHE_FRAG_TYPE_HTTP, char *hostname = 0, int host_len = 0);
+ Action *open_write(Continuation *cont, const CacheKey *key, CacheHTTPInfo *old_info, time_t pin_in_cache = (time_t)0,
+ const CacheKey *key1 = NULL, CacheFragType type = CACHE_FRAG_TYPE_HTTP, const char *hostname = 0, int host_len = 0);
Action *open_write(Continuation *cont, URL *url, CacheHTTPHdr *request, CacheHTTPInfo *old_info, time_t pin_in_cache = (time_t)0,
CacheFragType type = CACHE_FRAG_TYPE_HTTP);
static void generate_key(INK_MD5 *md5, URL *url);
#endif
- Action *link(Continuation *cont, CacheKey *from, CacheKey *to, CacheFragType type, char *hostname, int host_len);
- Action *deref(Continuation *cont, CacheKey *key, CacheFragType type, char *hostname, int host_len);
+ Action *link(Continuation *cont, const CacheKey *from, const CacheKey *to, CacheFragType type, const char *hostname, int host_len);
+ Action *deref(Continuation *cont, const CacheKey *key, CacheFragType type, const char *hostname, int host_len);
void vol_initialized(bool result);
int open_done();
- Vol *key_to_vol(CacheKey *key, char const *hostname, int host_len);
+ Vol *key_to_vol(const CacheKey *key, char const *hostname, int host_len);
Cache()
: cache_read_done(0), total_good_nvol(0), total_nvol(0), ready(CACHE_INITIALIZING), cache_size(0), // in store block size
@@ -1071,7 +1071,7 @@ Cache::open_read(Continuation *cont, CacheURL *url, CacheHTTPHdr *request, Cache
int len;
url->hash_get(&md5);
const char *hostname = url->host_get(&len);
- return open_read(cont, &md5, request, params, type, (char *)hostname, len);
+ return open_read(cont, &md5, request, params, type, hostname, len);
}
TS_INLINE void
@@ -1090,7 +1090,7 @@ Cache::open_write(Continuation *cont, CacheURL *url, CacheHTTPHdr *request, Cach
int len;
const char *hostname = url->host_get(&len);
- return open_write(cont, &url_md5, old_info, pin_in_cache, NULL, type, (char *)hostname, len);
+ return open_write(cont, &url_md5, old_info, pin_in_cache, NULL, type, hostname, len);
}
#endif
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/P_CacheVol.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_CacheVol.h b/iocore/cache/P_CacheVol.h
index 5545992..5499d24 100644
--- a/iocore/cache/P_CacheVol.h
+++ b/iocore/cache/P_CacheVol.h
@@ -544,7 +544,7 @@ struct Vol : public Continuation {
int begin_read_lock(CacheVC *cont);
// unused read-write interlock code
// currently http handles a write-lock failure by retrying the read
- OpenDirEntry *open_read(CryptoHash *key);
+ OpenDirEntry *open_read(const CryptoHash *key);
OpenDirEntry *open_read_lock(CryptoHash *key, EThread *t);
int close_read(CacheVC *cont);
int close_read_lock(CacheVC *cont);
@@ -865,7 +865,7 @@ free_EvacuationBlock(EvacuationBlock *b, EThread *t)
}
TS_INLINE OpenDirEntry *
-Vol::open_read(CryptoHash *key)
+Vol::open_read(const CryptoHash *key)
{
return open_dir.open_read(key);
}
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/P_RamCache.h
----------------------------------------------------------------------
diff --git a/iocore/cache/P_RamCache.h b/iocore/cache/P_RamCache.h
index d4350fa..6bd4270 100644
--- a/iocore/cache/P_RamCache.h
+++ b/iocore/cache/P_RamCache.h
@@ -33,7 +33,7 @@ struct RamCache {
virtual int get(INK_MD5 *key, Ptr<IOBufferData> *ret_data, uint32_t auxkey1 = 0, uint32_t auxkey2 = 0) = 0;
virtual int put(INK_MD5 *key, IOBufferData *data, uint32_t len, bool copy = false, uint32_t auxkey1 = 0,
uint32_t auxkey2 = 0) = 0;
- virtual int fixup(INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2) = 0;
+ virtual int fixup(const INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2) = 0;
virtual void init(int64_t max_bytes, Vol *vol) = 0;
virtual ~RamCache(){};
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/RamCacheCLFUS.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/RamCacheCLFUS.cc b/iocore/cache/RamCacheCLFUS.cc
index 6cfce51..5681b1f 100644
--- a/iocore/cache/RamCacheCLFUS.cc
+++ b/iocore/cache/RamCacheCLFUS.cc
@@ -74,7 +74,7 @@ struct RamCacheCLFUS : public RamCache {
// returns 1 on found/stored, 0 on not found/stored, if provided auxkey1 and auxkey2 must match
int get(INK_MD5 *key, Ptr<IOBufferData> *ret_data, uint32_t auxkey1 = 0, uint32_t auxkey2 = 0);
int put(INK_MD5 *key, IOBufferData *data, uint32_t len, bool copy = false, uint32_t auxkey1 = 0, uint32_t auxkey2 = 0);
- int fixup(INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2);
+ int fixup(const INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2);
void init(int64_t max_bytes, Vol *vol);
@@ -671,7 +671,7 @@ Lhistory:
}
int
-RamCacheCLFUS::fixup(INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2)
+RamCacheCLFUS::fixup(const INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2)
{
if (!max_bytes)
return 0;
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/bfa3ff44/iocore/cache/RamCacheLRU.cc
----------------------------------------------------------------------
diff --git a/iocore/cache/RamCacheLRU.cc b/iocore/cache/RamCacheLRU.cc
index 249e193..b947ef0 100644
--- a/iocore/cache/RamCacheLRU.cc
+++ b/iocore/cache/RamCacheLRU.cc
@@ -42,7 +42,7 @@ struct RamCacheLRU : public RamCache {
// returns 1 on found/stored, 0 on not found/stored, if provided auxkey1 and auxkey2 must match
int get(INK_MD5 *key, Ptr<IOBufferData> *ret_data, uint32_t auxkey1 = 0, uint32_t auxkey2 = 0);
int put(INK_MD5 *key, IOBufferData *data, uint32_t len, bool copy = false, uint32_t auxkey1 = 0, uint32_t auxkey2 = 0);
- int fixup(INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2);
+ int fixup(const INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2);
void init(int64_t max_bytes, Vol *vol);
@@ -198,7 +198,7 @@ RamCacheLRU::put(INK_MD5 *key, IOBufferData *data, uint32_t len, bool, uint32_t
}
int
-RamCacheLRU::fixup(INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2)
+RamCacheLRU::fixup(const INK_MD5 *key, uint32_t old_auxkey1, uint32_t old_auxkey2, uint32_t new_auxkey1, uint32_t new_auxkey2)
{
if (!max_bytes)
return 0;