diff --git a/rhodecode/lib/utils.py b/rhodecode/lib/utils.py --- a/rhodecode/lib/utils.py +++ b/rhodecode/lib/utils.py @@ -448,8 +448,10 @@ def repo2db_mapper(initial_repo_list, re # during starting install all cache keys for all repositories in the # system, this will register all repos and multiple instances key, _prefix, _org_key = CacheInvalidation._get_key(name) - log.debug("Creating a cache key for %s instance_id:`%s`" % (name, _prefix)) - CacheInvalidation._get_or_create_key(key, _prefix, _org_key, commit=False) + CacheInvalidation.invalidate(name) + log.debug("Creating a cache key for %s instance_id=>`%s`" + % (name, _prefix or '-')) + sa.commit() removed = [] if remove_obsolete: