diff MoinMoin/macro/__init__.py @ 1550:a4f0632414da

using request.cfg.cache more
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 14 Sep 2006 22:49:42 +0200
parents e219092e1a0d
children a45b23e6217d
line wrap: on
line diff
--- a/MoinMoin/macro/__init__.py	Thu Sep 14 22:08:45 2006 +0200
+++ b/MoinMoin/macro/__init__.py	Thu Sep 14 22:49:42 2006 +0200
@@ -37,14 +37,12 @@
 #############################################################################
 
 def getNames(cfg):
-    if hasattr(cfg, 'macro_names'):
-        return cfg.macro_names
-    else:
+    if not hasattr(cfg.cache, 'macro_names'):
         lnames = names[:]
         lnames.extend(i18n.wikiLanguages().keys())
         lnames.extend(wikiutil.getPlugins('macro', cfg))
-        cfg.macro_names = lnames # remember it
-        return lnames
+        cfg.cache.macro_names = lnames # remember it
+    return cfg.cache.macro_names
 
 
 #############################################################################