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 ...@@ -32,6 +32,8 @@ from Products.ERP5Type import Permissions, _dtmldir
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Globals import DTMLFile from Globals import DTMLFile
MEMCACHED_TOOL_MODIFIED_FLAG_PROPERTY_ID = '_v_memcached_edited'
if allowMemcachedTool(): if allowMemcachedTool():
import memcache import memcache
import traceback import traceback
...@@ -89,6 +91,10 @@ if allowMemcachedTool(): ...@@ -89,6 +91,10 @@ if allowMemcachedTool():
would not be ignored. would not be ignored.
""" """
try: 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(): for key, action in self.scheduled_action_dict.iteritems():
if action is UPDATE_ACTION: if action is UPDATE_ACTION:
self.memcached_connection.set(key, self.local_cache[key], 0) 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