changeset 4837:fc0c70fe84f3

Groups2009: wikidicts cache arena was removed. pagedicts and pagegroups are used instead.
author Dmitrijs Milajevs <dimazest@gmail.com>
date Sat, 04 Jul 2009 17:43:38 +0100
parents 8be26b0ebc96
children d1996f3b59d5
files MoinMoin/_tests/test_PageEditor.py MoinMoin/packages.py MoinMoin/script/maint/cleancache.py
diffstat 3 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_PageEditor.py	Sat Jul 04 17:40:22 2009 +0100
+++ b/MoinMoin/_tests/test_PageEditor.py	Sat Jul 04 17:43:38 2009 +0100
@@ -147,12 +147,10 @@
 
     def deleteCaches(self):
         """ Force the wiki to scan the test page into the dicts """
-        from MoinMoin import caching
-        caching.CacheEntry(self.request, 'wikidicts', 'dicts', scope='wiki').remove()
-        if hasattr(self.request, 'dicts'):
-            del self.request.dicts
-        if hasattr(self.request.cfg, 'DICTS_DATA'):
-            del self.request.cfg.DICTS_DATA
+#         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 = {}
 
     def deleteTestPage(self):
--- a/MoinMoin/packages.py	Sat Jul 04 17:40:22 2009 +0100
+++ b/MoinMoin/packages.py	Sat Jul 04 17:43:38 2009 +0100
@@ -376,7 +376,6 @@
         except AttributeError:
             pass
         self.request.pages = {}
-        caching.CacheEntry(self.request, 'wikidicts', 'dicts', scope='wiki').remove()
         page.clean_acl_cache()
 
     def runScript(self, commands):
--- a/MoinMoin/script/maint/cleancache.py	Sat Jul 04 17:40:22 2009 +0100
+++ b/MoinMoin/script/maint/cleancache.py	Sat Jul 04 17:43:38 2009 +0100
@@ -56,8 +56,14 @@
             ('charts', 'pagehits'),
             ('charts', 'useragents'),
             ('user', 'name2id'),
-            ('wikidicts', 'dicts'),
         ]
         for arena, key in arena_key_list:
             caching.CacheEntry(request, arena, key, scope='wiki').remove()
 
+        arena_scope_list =  [('pagedicts', 'wiki'),
+                             ('pagegroups', 'wiki'),
+        ]
+        for arena, scope in arena_scope_list:
+            for key caching.get_cache_list(request, arena, scope):
+                caching.CacheEntry(request, arena, key, scope=scope).remove()
+