diff --git a/pylons_app/lib/base.py b/pylons_app/lib/base.py --- a/pylons_app/lib/base.py +++ b/pylons_app/lib/base.py @@ -9,9 +9,9 @@ from beaker.cache import cache_region from pylons import tmpl_context as c from pylons_app.model.hg_model import HgModel -@cache_region('long_term', 'repo_list_2') -def _get_repos(): - return [rep['name'] for rep in HgModel().get_repos()] +@cache_region('long_term', 'cached_repo_list') +def _get_repos_cached(): + return [rep for rep in HgModel().get_repos()] class BaseController(WSGIController): @@ -20,7 +20,7 @@ class BaseController(WSGIController): # WSGIController.__call__ dispatches to the Controller method # the request is routed to. This routing information is # available in environ['pylons.routes_dict'] - c.repo_list = _get_repos() + c.cached_repo_list = _get_repos_cached() self.sa = meta.Session try: return WSGIController.__call__(self, environ, start_response)