comparison rhodecode/lib/utils.py @ 3774:60335b702a00 beta

invalidation: don't create CacheInvalidation records on startup Creating the records early gave an advantage before lightweight was introduced. With lightweight it is no longer necessary. The records will be created on demand anyway and there is no reason to create and maintain them before they are used.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 03 Apr 2013 15:56:12 +0200
parents 8e2cd46f765b
children d7488551578e
comparison
equal deleted inserted replaced
3773:8e2cd46f765b 3774:60335b702a00
470 ScmModel().install_git_hook(new_repo.scm_instance) 470 ScmModel().install_git_hook(new_repo.scm_instance)
471 new_repo.update_changeset_cache() 471 new_repo.update_changeset_cache()
472 elif install_git_hook: 472 elif install_git_hook:
473 if db_repo.repo_type == 'git': 473 if db_repo.repo_type == 'git':
474 ScmModel().install_git_hook(db_repo.scm_instance) 474 ScmModel().install_git_hook(db_repo.scm_instance)
475 # during starting install all cache keys for all repositories in the
476 # system, this will register all repos and multiple instances
477 cache_key = CacheInvalidation._get_cache_key(name)
478 log.debug("Creating invalidation cache key for %s: %s", name, cache_key)
479 CacheInvalidation.test_and_set_valid(name, None)
480 475
481 sa.commit() 476 sa.commit()
482 removed = [] 477 removed = []
483 if remove_obsolete: 478 if remove_obsolete:
484 # remove from database those repositories that are not in the filesystem 479 # remove from database those repositories that are not in the filesystem