changeset 4912:5440059649f7

script.maint.cleancache: users draft files got also cleaned
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Fri, 24 Jul 2009 13:34:31 +0200
parents 6031b8170766
children 3c7e2e535d67
files MoinMoin/script/maint/cleancache.py docs/CHANGES
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/script/maint/cleancache.py	Sun Jul 12 13:49:05 2009 +0200
+++ b/MoinMoin/script/maint/cleancache.py	Fri Jul 24 13:34:31 2009 +0200
@@ -7,7 +7,7 @@
 @license: GNU GPL, see COPYING for details.
 """
 
-from MoinMoin import caching
+from MoinMoin import caching, user
 from MoinMoin.Page import Page
 from MoinMoin.script import MoinScript
 
@@ -61,3 +61,7 @@
         for arena, key in arena_key_list:
             caching.CacheEntry(request, arena, key, scope='wiki').remove()
 
+        # clean drafts of users
+        uids = user.getUserList(request)
+        for key in uids:
+            caching.CacheEntry(request, 'drafts', key, scope='wiki').remove()
--- a/docs/CHANGES	Sun Jul 12 13:49:05 2009 +0200
+++ b/docs/CHANGES	Fri Jul 24 13:34:31 2009 +0200
@@ -16,6 +16,10 @@
     editor_force = True
     editor_default = 'text'  # internal default, just for completeness
 
+Version 1.8.current:
+  Other changes:
+    * moin maint cleancache purges now also drafts
+
 Version 1.8.4:
   Bug fixes:
     * ACL security: fix bug in hierarchical ACL processing, more restrictive