Skip to content

Commit

Permalink
Merge pull request #1480 from cbowman0/rfc/MemcachedKeyLengthError
Browse files Browse the repository at this point in the history
Fix Memcache key length error
  • Loading branch information
obfuscurity committed Apr 20, 2016
2 parents 0078fca + 6b2aebe commit b3a71b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webapp/graphite/remote_storage.py
Expand Up @@ -8,6 +8,7 @@
from graphite.readers import FetchInProgress
from graphite.logger import log
from graphite.util import unpickle
from graphite.render.hashing import compactHash

def connector_class_selector(https_support=False):
return httplib.HTTPSConnection if https_support else httplib.HTTPConnection
Expand Down Expand Up @@ -48,7 +49,7 @@ def __init__(self, store, query):
else:
end = ""

self.cacheKey = "find:%s:%s:%s:%s" % (store.host, query.pattern, start, end)
self.cacheKey = "find:%s:%s:%s:%s" % (store.host, compactHash(query.pattern), start, end)
self.cachedResult = None

def send(self):
Expand Down

0 comments on commit b3a71b8

Please sign in to comment.