Mercurial > kallithea
changeset 3683:df57253e965a beta
invalidation: simplify get_prefix
str.split will always have a [0], and cache_key will always contain
repo_name=cache_args and the split will thus always return two elements
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 04 Apr 2013 15:55:53 +0200 |
parents | cf65b2c1b69d |
children | e8aff2016d86 |
files | rhodecode/model/db.py |
diffstat | 1 files changed, 1 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/model/db.py Wed Mar 27 19:55:50 2013 +0100 +++ b/rhodecode/model/db.py Thu Apr 04 15:55:53 2013 +0200 @@ -1656,10 +1656,7 @@ Guess prefix that might have been used in _get_cache_key to generate self.cache_key . Only used for informational purposes in repo_edit.html . """ - _split = self.cache_key.split(self.cache_args, 1) - if len(_split) == 2: - return _split[0] - return '' + return self.cache_key.split(self.cache_args, 1)[0] @classmethod def _get_cache_key(cls, key):