This commit is contained in:
parent
4c88eb4121
commit
f83f0faa1f
1 changed files with 2 additions and 2 deletions
|
@ -14,8 +14,8 @@ class Cache:
|
||||||
return Cache.__instance
|
return Cache.__instance
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
if Cache.__instance is None:
|
if Cache.__instance is not None:
|
||||||
raise Exception("Cache is a singleton. Use Cache.getInstance()")
|
raise Exception("Cache is a singleton. Use Cache.get_instance()")
|
||||||
Cache.__instance = self
|
Cache.__instance = self
|
||||||
self.db = Walrus(host='localhost', port=6379, db=0)
|
self.db = Walrus(host='localhost', port=6379, db=0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue