# HG changeset patch # User Paul Boddie # Date 1390671651 -3600 # Node ID de7df7ffc597fb41a6d406872348b0d52beca4c2 # Parent 0965353b33182b56d78c2c88e79a47b09c2f2c16 Made page-related caching functions available in MoinSupport. diff -r 0965353b3318 -r de7df7ffc597 actions/EventAggregatorUpdate.py --- a/actions/EventAggregatorUpdate.py Fri Jan 24 22:53:15 2014 +0100 +++ b/actions/EventAggregatorUpdate.py Sat Jan 25 18:40:51 2014 +0100 @@ -9,6 +9,7 @@ from EventAggregatorSupport.Actions import get_date_functions from EventAggregatorSupport import * from MoinDateSupport import getParameterMonth +from MoinSupport import getPageCacheKey, enforcePageCacheLimit from MoinMoin.Page import Page, is_cache_exception from MoinMoin import caching, config, log @@ -30,7 +31,7 @@ # Attempt to get any previously cached view. - key = page.getCacheKey(request) + key = getPageCacheKey(page, request) cache = caching.CacheEntry(request, page, key, scope='item') if cache.exists(): @@ -97,7 +98,7 @@ # Attempt to cache the output and then send it. try: - page.enforceCacheLimit(request) + enforcePageCacheLimit(page, request) cache.update(output.encode(config.charset)) except caching.CacheError, exc: logging.warning("Could not cache output for EventAggregatorUpdate in page %s: %s" % (pagename, str(exc)))