Just Launched: You can now import projects and releases from Google Code onto SourceForge
We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps. Read More
Just an update on my caching question - I think I've found the answer,
but would be curious if there are alternative/better methods.
1. In the macro header, use the line
Dependencies = ["time"]
This forces a recalculation with each call of the macro.
2. Inside the macro call do this:
from MoinMoin import caching, wikiutil
cache = caching.CacheEntry(self.macro.request, 'RSS',
# if cached entry is from within the last hour, use it.
if (time.time() - cache.mtime() < 3600):
#else, do feed parsing, generate HTML ...
From: Alexander Schremmer <2005a@us...> - 2005-04-21 20:21:43
On Wed, 20 Apr 2005 15:14:01 +0200, Jim Clark wrote:
> Just an update on my caching question - I think I've found the answer,
> but would be curious if there are alternative/better methods.
No, there are not. The dependency system currently just differentiates two
cases: cachable or not. In Moin 1.4, there might be a better persistency
Your solution is perfectly suitable to do it like you want.