Mercurial > kallithea
diff pylons_app/lib/base.py @ 196:568f95056716
moved all cache function out to Base Controller for easier maintainance
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 22 May 2010 19:18:09 +0200 |
parents | 3380ca40cdba |
children | fdcef6ea3b55 |
line wrap: on
line diff
--- a/pylons_app/lib/base.py Sat May 22 16:07:28 2010 +0200 +++ b/pylons_app/lib/base.py Sat May 22 19:18:09 2010 +0200 @@ -16,6 +16,10 @@ def _get_repos_cached(): return [rep for rep in HgModel().get_repos()] +@cache_region('long_term', 'full_changelog') +def _full_changelog_cached(repo_name): + return list(reversed(list(HgModel().get_repo(repo_name)))) + class BaseController(WSGIController): def __before__(self):