cache: Import random.

This commit is contained in:
Trevor Senior
2015-02-19 13:09:42 -05:00
committed by Brian Simpson
parent 28e140d05d
commit d0beab632e

View File

@@ -40,6 +40,8 @@ from r2.lib.hardcachebackend import HardCacheBackend
from r2.lib.sgm import sgm # get this into our namespace so that it's
# importable from us
import random
# This is for use in the health controller
_CACHE_SERVERS = set()
@@ -924,7 +926,6 @@ class CassandraCache(CacheUtils):
return ret
def _warm(self, keys):
import random
if False and random.random() > 0.98:
print 'Warming', keys
self.cf.multiget(keys)