Remove semaphore on get
This commit is contained in:
1 parent
e13c63081d
commit
9d2fd30924
1 file changed
+1
-6
+1
-6
@@ -240,12 +240,7 @@ class Cacheable(object):
|
||||
|
||||
def get(self, cursor, key):
|
||||
try:
|
||||
self.semaphore.acquire()
|
||||
try:
|
||||
res = self._cache[cursor.dbname][key][0]
|
||||
finally:
|
||||
self.semaphore.release()
|
||||
return res
|
||||
return self._cache[cursor.dbname][key][0]
|
||||
except KeyError:
|
||||
return None
|
||||
|
||||
|
||||
Reference in new issue
Block a user