Commit 00261a15 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

add an edited flag.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13808 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 63654541
......@@ -32,6 +32,8 @@ from Products.ERP5Type import Permissions, _dtmldir
from AccessControl import ClassSecurityInfo
from Globals import DTMLFile
MEMCACHED_TOOL_MODIFIED_FLAG_PROPERTY_ID = '_v_memcached_edited'
if allowMemcachedTool():
import memcache
import traceback
......@@ -89,6 +91,10 @@ if allowMemcachedTool():
would not be ignored.
"""
try:
for key, value in self.local_cache.iteritems():
if getattr(value, MEMCACHED_TOOL_MODIFIED_FLAG_PROPERTY_ID, None):
delattr(value, MEMCACHED_TOOL_MODIFIED_FLAG_PROPERTY_ID)
self.scheduled_action_dict[key] = UPDATE_ACTION
for key, action in self.scheduled_action_dict.iteritems():
if action is UPDATE_ACTION:
self.memcached_connection.set(key, self.local_cache[key], 0)
......
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