Commit 48980ffe authored by Vincent Pelletier's avatar Vincent Pelletier

Factorise self.mq_cache lookup.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1892 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent a3238bea
......@@ -756,13 +756,14 @@ class Application(object):
# Update cache
self._cache_lock_acquire()
try:
mq_cache = self.mq_cache
for oid, data in self.local_var.data_dict.iteritems():
if data == '':
if oid in self.mq_cache:
del self.mq_cache[oid]
if oid in mq_cache:
del mq_cache[oid]
else:
# Now serial is same as tid
self.mq_cache[oid] = tid, data
mq_cache[oid] = tid, data
finally:
self._cache_lock_release()
self.local_var.clear()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment