diff MoinMoin/wikiutil.py @ 1549:e36313297589

introduce request.cfg.cache object, start using it for some precompiled regexes
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 14 Sep 2006 22:08:45 +0200
parents 563bfe02b04f
children a4f0632414da
line wrap: on
line diff
--- a/MoinMoin/wikiutil.py	Thu Sep 14 18:37:05 2006 +0200
+++ b/MoinMoin/wikiutil.py	Thu Sep 14 22:08:45 2006 +0200
@@ -682,8 +682,7 @@
     @rtype: bool
     @return: true if page is a template page
     """
-    filter = re.compile(request.cfg.page_template_regex, re.UNICODE)
-    return filter.search(pagename) is not None
+    return request.cfg.cache.page_template_regex.search(pagename) is not None
 
 
 def isGroupPage(request, pagename):
@@ -693,8 +692,7 @@
     @rtype: bool
     @return: true if page is a form page
     """
-    filter = re.compile(request.cfg.page_group_regex, re.UNICODE)
-    return filter.search(pagename) is not None
+    return request.cfg.cache.page_group_regex.search(pagename) is not None
 
 
 def filterCategoryPages(request, pagelist):
@@ -711,7 +709,7 @@
     @rtype: list
     @return: only the category pages of pagelist
     """
-    func = re.compile(request.cfg.page_category_regex, re.UNICODE).search
+    func = request.cfg.cache.page_category_regex.search
     return filter(func, pagelist)