Commit 1660b9b7 authored by Vincent Pelletier's avatar Vincent Pelletier

Factorise access to mq_cache.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2424 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 4c224318
...@@ -123,10 +123,11 @@ class PrimaryNotificationsHandler(BaseHandler): ...@@ -123,10 +123,11 @@ class PrimaryNotificationsHandler(BaseHandler):
app._cache_lock_acquire() app._cache_lock_acquire()
try: try:
# ZODB required a dict with oid as key, so create it # ZODB required a dict with oid as key, so create it
mq_cache = app.mq_cache
oids = dict.fromkeys(oid_list, tid) oids = dict.fromkeys(oid_list, tid)
for oid in oid_list: for oid in oid_list:
if oid in app.mq_cache: if oid in mq_cache:
del app.mq_cache[oid] del mq_cache[oid]
db = app.getDB() db = app.getDB()
if db is not None: if db is not None:
db.invalidate(tid, oids) db.invalidate(tid, oids)
......
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