changeset 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 f9639ed07af2
files MoinMoin/_tests/test_user.py MoinMoin/wikiutil.py
diffstat 2 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/_tests/test_user.py	Thu Sep 14 22:49:42 2006 +0200
+++ b/MoinMoin/_tests/test_user.py	Thu Sep 14 22:59:17 2006 +0200
@@ -75,7 +75,7 @@
 
         # Remove user name to id cache, or next test will fail
         caching.CacheEntry(self.request, 'user', 'name2id', scope='wiki').remove()
-        del self.request.cfg._name2id
+        del self.request.cfg.cache.name2id
 
         # Prevent user list caching - we create and delete users too
         # fast for that.
--- 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