Changeset - df57253e965a
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-04-04 15:55:53
madski@unity3d.com
Transplanted from: 02da2762f3ee
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
1 file changed with 1 insertions and 4 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/db.py
Show inline comments
 
@@ -1656,10 +1656,7 @@ class CacheInvalidation(Base, BaseModel)
 
        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):
0 comments (0 inline, 0 general)