comparison pylons_app/controllers/admin.py @ 171:52bbeb1e813f

Added universal cache invalidator for two cached functions. added invalidation when repository was added or deleted, and another invalidation when there was a mercurial command involved.
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 21 May 2010 02:44:40 +0200
parents b5e59e2b5cfe
children b68b2246e5a6
comparison
equal deleted inserted replaced
170:f9e8920958af 171:52bbeb1e813f
80 try: 80 try:
81 self._create_repo(new_repo) 81 self._create_repo(new_repo)
82 c.new_repo = new_repo 82 c.new_repo = new_repo
83 c.msg = 'added repo' 83 c.msg = 'added repo'
84 #clear our cached list for refresh with new repo 84 #clear our cached list for refresh with new repo
85 invalidate_cache('repo_list_2') 85 invalidate_cache('cached_repo_list')
86 except Exception as e: 86 except Exception as e:
87 c.new_repo = 'Exception when adding: %s' % new_repo 87 c.new_repo = 'Exception when adding: %s' % new_repo
88 c.msg = str(e) 88 c.msg = str(e)
89 89
90 return render('admin/add.html') 90 return render('admin/add.html')