Mercurial > kallithea
diff rhodecode/lib/middleware/simplegit.py @ 665:070f32743632 beta
Moved out reposcan into hg Model.
Rewrote repo scann and caching of repositories, all is in hgModel.
Changed invalidate cache calls.
mergeds main repo list and repo switcher list into one new based on hgModel.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 07 Nov 2010 15:02:56 +0100 |
parents | aefc371a2531 |
children | 01be209b9828 |
line wrap: on
line diff
--- a/rhodecode/lib/middleware/simplegit.py Sat Nov 06 16:19:01 2010 +0100 +++ b/rhodecode/lib/middleware/simplegit.py Sun Nov 07 15:02:56 2010 +0100 @@ -83,15 +83,15 @@ self.repository = None self.username = None self.action = None - + def __call__(self, environ, start_response): if not is_git(environ): return self.application(environ, start_response) - + proxy_key = 'HTTP_X_REAL_IP' def_key = 'REMOTE_ADDR' self.ipaddr = environ.get(proxy_key, environ.get(def_key, '0.0.0.0')) - + #=================================================================== # AUTHENTICATE THIS GIT REQUEST #=================================================================== @@ -104,7 +104,7 @@ REMOTE_USER.update(environ, result) else: return result.wsgi_application(environ, start_response) - + #======================================================================= # GET REPOSITORY #======================================================================= @@ -206,5 +206,4 @@ """we know that some change was made to repositories and we should invalidate the cache to see the changes right away but only for push requests""" - invalidate_cache('cached_repo_list') - invalidate_cache('full_changelog', repo_name) + invalidate_cache('get_repo_cached_%s' % repo_name)