changeset 5661:926f102b4d9c

script.maint.cleancache: clean also i18n cache files
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 02 May 2010 18:42:54 +0200
parents 8ed0f132fb44
children 64d0629dd835
files MoinMoin/script/maint/cleancache.py
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/script/maint/cleancache.py	Thu Apr 29 11:42:41 2010 +0200
+++ b/MoinMoin/script/maint/cleancache.py	Sun May 02 18:42:54 2010 +0200
@@ -7,7 +7,7 @@
 @license: GNU GPL, see COPYING for details.
 """
 
-from MoinMoin import caching, user
+from MoinMoin import caching, i18n, user
 from MoinMoin.Page import Page
 from MoinMoin.script import MoinScript
 
@@ -70,3 +70,7 @@
         for key in uids:
             caching.CacheEntry(request, 'drafts', key, scope='wiki').remove()
 
+        # clean language cache files
+        wiki_languages = i18n.wikiLanguages().keys()
+        for key in wiki_languages:
+            caching.CacheEntry(request, 'i18n', key, scope='wiki').remove()