changeset 4840:ce2667a4d982

Groups2009: request.cfg.DICTS_DATA and request.pages were killed.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Thu, 09 Jul 2009 11:06:53 +0200
parents e8beef3218b9
children 14c74ab59b45
files MoinMoin/Page.py MoinMoin/_tests/test_PageEditor.py MoinMoin/packages.py
diffstat 3 files changed, 4 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Wed Jul 08 19:30:15 2009 +0200
+++ b/MoinMoin/Page.py	Thu Jul 09 11:06:53 2009 +0200
@@ -1863,9 +1863,7 @@
             # WARNING: SLOW
             pages = self.getPageList(user='')
         else:
-            pages = self.request.pages
-            if not pages:
-                pages = self._listPages()
+            pages = self._listPages()
         count = len(pages)
         self.request.clock.stop('getPageCount')
 
--- a/MoinMoin/_tests/test_PageEditor.py	Wed Jul 08 19:30:15 2009 +0200
+++ b/MoinMoin/_tests/test_PageEditor.py	Thu Jul 09 11:06:53 2009 +0200
@@ -147,11 +147,7 @@
 
     def deleteCaches(self):
         """ Force the wiki to scan the test page into the dicts """
-#         if hasattr(self.request, 'dicts'):
-#             del self.request.dicts
-#         if hasattr(self.request.cfg, 'DICTS_DATA'):
-#             del self.request.cfg.DICTS_DATA
-        self.request.pages = {}
+        # New dicts does not require cache refresh.
 
     def deleteTestPage(self):
         """ Delete temporary page, bypass logs and notifications """
--- a/MoinMoin/packages.py	Wed Jul 08 19:30:15 2009 +0200
+++ b/MoinMoin/packages.py	Thu Jul 09 11:06:53 2009 +0200
@@ -371,12 +371,8 @@
         self._extractToFile(filename, pagefile)
 
         # Clear caches
-        try:
-            del self.request.cfg.DICTS_DATA
-        except AttributeError:
-            pass
-        self.request.pages = {}
-        page.clean_acl_cache()
+        # TODO Code from MoinMoin/script/maint/cleancache.py may be used
+        page.clean_acl_cache() # It is not necessary should be removed.
 
     def runScript(self, commands):
         """ Runs the commands.