Skip to content

Commit

Permalink
Remove g.cache
Browse files Browse the repository at this point in the history
It has been replaced by g.gencache (mcrouter) and other pools
  • Loading branch information
bsimpson63 committed Jul 11, 2016
1 parent 8fbc42d commit a384ebd
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 21 deletions.
2 changes: 0 additions & 2 deletions r2/example.ini
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,6 @@ CLOUDSEARCH_SUBREDDIT_DOC_API =

############################################ MEMCACHE
num_mc_clients = 5
# core memcache cluster, Things and various other stuff
memcaches = 127.0.0.1:11211
# caches used for @memoize decorator magic
memoizecaches = 127.0.0.1:11211
# hosts to store memcache-based locks on
Expand Down
19 changes: 0 additions & 19 deletions r2/r2/lib/app_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ class Globals(object):
ConfigValue.tuple: [
'plugins',
'stalecaches',
'memcaches',
'lockcaches',
'permacache_memcaches',
'memoizecaches',
Expand Down Expand Up @@ -726,15 +725,6 @@ def setup(self):
################# MEMCACHE
num_mc_clients = self.num_mc_clients

# the main memcache pool. used for most everything.
memcaches = CMemcache(
"main",
self.memcaches,
min_compress_len=1400,
num_clients=num_mc_clients,
validators=[validate_size_error],
)

# a pool just used for @memoize results
memoizecaches = CMemcache(
"memoize",
Expand Down Expand Up @@ -870,22 +860,13 @@ def setup(self):
else LocalCache)

if stalecaches:
self.cache = StaleCacheChain(
localcache_cls(),
stalecaches,
memcaches,
)
# temporary duplicate for g.cache as we move keys in that pool
# to mcrouter
self.gencache = StaleCacheChain(
localcache_cls(),
stalecaches,
self.mcrouter,
)
else:
self.cache = CacheChain((localcache_cls(), memcaches))
self.gencache = CacheChain((localcache_cls(), self.mcrouter))
cache_chains.update(cache=self.cache)
cache_chains.update(gencache=self.gencache)

if stalecaches:
Expand Down

0 comments on commit a384ebd

Please sign in to comment.