changeset 193:236f561fa21f

update cachecleaner and recomment its usage on upgrading imported from: moin--main--1.5--patch-195
author Thomas Waldmann <tw@waldmann-edv.de>
date Sat, 05 Nov 2005 17:39:14 +0000
parents 509d6bfc1680
children 722b8f648630
files MoinMoin/scripts/cachecleaner.py docs/CHANGES
diffstat 2 files changed, 13 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/scripts/cachecleaner.py	Sat Nov 05 16:29:05 2005 +0000
+++ b/MoinMoin/scripts/cachecleaner.py	Sat Nov 05 17:39:14 2005 +0000
@@ -21,18 +21,19 @@
     by the wiki text to html formatter,
 """
 
-base = "." # location of data directory
-fname = 'text_html' # cache filename to delete
+base = "." # directory containing the data directory
+fnames = ['text_html', 'pagelinks', ] # cache filenames to delete
 
 import sys, os
 
-pagesdir = os.path.join(base,'data','pages')
+pagesdir = os.path.join(base, 'data', 'pages')
 for f in os.listdir(pagesdir):
-    cachefile = os.path.join(pagesdir,f,'cache',fname)
-    try:
-        os.remove(cachefile)
-    except:
-        pass
+    for fname in fnames:
+        cachefile = os.path.join(pagesdir, f, 'cache', fname)
+        try:
+            os.remove(cachefile)
+        except:
+            pass
     
 # EOF
 
--- a/docs/CHANGES	Sat Nov 05 16:29:05 2005 +0000
+++ b/docs/CHANGES	Sat Nov 05 17:39:14 2005 +0000
@@ -11,6 +11,10 @@
       old python: http://moinmoin.wikiwikiweb.de/NewPythonOnOldLinux
       The hint also does apply to other POSIX style operating systems,
       not only Linux.
+    * We recommend you use MoinMoin/scripts/cachecleaner.py to clean the
+      wiki's cache (see comments at top of the script).
+      The cache will automatically be rebuilt (some operations may take
+      some time when first being used, e.g. linkto: search, so be patient!).
 
   Config Changes:
      * there is a file CHANGES.config with just the recently changed stuff