Minor refactoring

This commit is contained in:
Raphael Michel
2014-10-17 10:25:29 +02:00
parent 912b0b4211
commit a7beb46c94
10 changed files with 32 additions and 14 deletions

View File

@@ -38,7 +38,8 @@ class EventRelatedCache:
key = hashlib.sha256(key.encode("UTF-8")).hexdigest()
return key
def _strip_prefix(self, key):
@staticmethod
def _strip_prefix(key):
return key.split(":", 3)[-1] if 'event:' in key else key
def clear(self):