Commit 45d8d248 authored by Nicolas Delaby's avatar Nicolas Delaby

Compute a better Cache Key to refresh modified object list

rigth after installation of BusinessTemplate.
Usefull when calling reinstall just after a fresh installation.
Reviewed by Seb

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@32498 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eea3746d
No related merge requests found
...@@ -61,9 +61,18 @@ def getModifiedObjectList(context):\n ...@@ -61,9 +61,18 @@ def getModifiedObjectList(context):\n
result = context.preinstall()\n result = context.preinstall()\n
return result\n return result\n
\n \n
def cacheIdGenerator(method_id, *args, **kw):\n
context = args[0]\n
return \'%s%s%s\' % (method_id,\n
context.getUid(),\n
context.getModificationDate().timeTime())\n
\n
cache_id_generator = cacheIdGenerator\n
\n
getModifiedObjectList = CachingMethod(getModifiedObjectList,\n getModifiedObjectList = CachingMethod(getModifiedObjectList,\n
id=\'BusinessTemplate_getModifiedObjectList\',\n id=\'BusinessTemplate_getModifiedObjectList\',\n
cache_factory=\'erp5_ui_medium\')\n cache_factory=\'erp5_ui_medium\',\n
cache_id_generator=cache_id_generator)\n
\n \n
modified_object_list = getModifiedObjectList(context)\n modified_object_list = getModifiedObjectList(context)\n
keys = modified_object_list.keys()\n keys = modified_object_list.keys()\n
...@@ -159,6 +168,8 @@ return object_list\n ...@@ -159,6 +168,8 @@ return object_list\n
<string>context</string> <string>context</string>
<string>Base_translateString</string> <string>Base_translateString</string>
<string>getModifiedObjectList</string> <string>getModifiedObjectList</string>
<string>cacheIdGenerator</string>
<string>cache_id_generator</string>
<string>modified_object_list</string> <string>modified_object_list</string>
<string>keys</string> <string>keys</string>
<string>no_backup_list</string> <string>no_backup_list</string>
......
1471 1474
\ No newline at end of file \ No newline at end of file
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