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): ...@@ -756,13 +756,14 @@ class Application(object):
# Update cache # Update cache
self._cache_lock_acquire() self._cache_lock_acquire()
try: try:
mq_cache = self.mq_cache
for oid, data in self.local_var.data_dict.iteritems(): for oid, data in self.local_var.data_dict.iteritems():
if data == '': if data == '':
if oid in self.mq_cache: if oid in mq_cache:
del self.mq_cache[oid] del mq_cache[oid]
else: else:
# Now serial is same as tid # Now serial is same as tid
self.mq_cache[oid] = tid, data mq_cache[oid] = tid, data
finally: finally:
self._cache_lock_release() self._cache_lock_release()
self.local_var.clear() 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