diff MoinMoin/wikiutil.py @ 1551:0d2f2d531e81

using request.cfg.cache more
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 14 Sep 2006 22:59:17 +0200
parents a4f0632414da
children 1453513eaa7e
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Thu Sep 14 22:49:42 2006 +0200
+++ b/MoinMoin/wikiutil.py	Thu Sep 14 22:59:17 2006 +0200
@@ -547,14 +547,14 @@
         generate_file_list(request)
 
     try:
-        _interwiki_list = request.cfg._interwiki_list
-        old_mtime = request.cfg._interwiki_mtime
-        if request.cfg._interwiki_ts + (1*60) < now: # 1 minutes caching time
+        _interwiki_list = request.cfg.cache.interwiki_list
+        old_mtime = request.cfg.cache.interwiki_mtime
+        if request.cfg.cache.interwiki_ts + (1*60) < now: # 1 minutes caching time
             max_mtime = get_max_mtime(request.cfg.shared_intermap_files, Page(request, INTERWIKI_PAGE))
             if max_mtime > old_mtime:
                 raise AttributeError # refresh cache
             else:
-                request.cfg._interwiki_ts = now
+                request.cfg.cache.interwiki_ts = now
     except AttributeError:
         _interwiki_list = {}
         lines = []
@@ -585,9 +585,9 @@
             _interwiki_list[request.cfg.interwikiname] = request.getScriptname() + '/'
 
         # save for later
-        request.cfg._interwiki_list = _interwiki_list
-        request.cfg._interwiki_ts = now
-        request.cfg._interwiki_mtime = get_max_mtime(request.cfg.shared_intermap_files, Page(request, INTERWIKI_PAGE))
+        request.cfg.cache.interwiki_list = _interwiki_list
+        request.cfg.cache.interwiki_ts = now
+        request.cfg.cache.interwiki_mtime = get_max_mtime(request.cfg.shared_intermap_files, Page(request, INTERWIKI_PAGE))
 
     return _interwiki_list