changeset 1636:985659f4ed55

avoid */MoinEditorBackup pages being cached because global edit-log doesn't have their changes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 22 Oct 2006 19:06:15 +0200
parents a41c60e53ddd
children 47a173ae5401
files MoinMoin/Page.py
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Sun Oct 22 17:30:23 2006 +0200
+++ b/MoinMoin/Page.py	Sun Oct 22 19:06:15 2006 +0200
@@ -44,8 +44,13 @@
             @param key: used as secondary access key after name
             @param data: the data item that should be remembered
         """
-        d = self.cache.setdefault(name, {})
-        d[key] = data
+        if not name.endswith(u'/MoinEditorBackup'):
+            # never cache */MoinEditorBackup related data as we won't get a
+            # global edit-log entry when those pages change!
+            # TODO: we maybe better should not use those pages, but rather
+            # store that stuff into some cache or into the user profile.
+            d = self.cache.setdefault(name, {})
+            d[key] = data
 
     def getItem(self, request, name, key):
         """ Returns some item stored for item name under key.