From a384ebd654396a454377224ea8e9cccad4159807 Mon Sep 17 00:00:00 2001 From: Brian Simpson Date: Mon, 27 Jun 2016 15:01:57 -0700 Subject: [PATCH] Remove g.cache It has been replaced by g.gencache (mcrouter) and other pools --- r2/example.ini | 2 -- r2/r2/lib/app_globals.py | 19 ------------------- 2 files changed, 21 deletions(-) diff --git a/r2/example.ini b/r2/example.ini index 83002e411e..2860cf4c0c 100644 --- a/r2/example.ini +++ b/r2/example.ini @@ -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 diff --git a/r2/r2/lib/app_globals.py b/r2/r2/lib/app_globals.py index 909fee2735..2935c0a3d2 100644 --- a/r2/r2/lib/app_globals.py +++ b/r2/r2/lib/app_globals.py @@ -266,7 +266,6 @@ class Globals(object): ConfigValue.tuple: [ 'plugins', 'stalecaches', - 'memcaches', 'lockcaches', 'permacache_memcaches', 'memoizecaches', @@ -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", @@ -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: