Show More
@@ -1167,7 +1167,6 b' class Repository(Base, BaseModel):' | |||
|
1167 | 1167 | def _c(repo_name): |
|
1168 | 1168 | return self.__get_instance() |
|
1169 | 1169 | rn = self.repo_name |
|
1170 | log.debug('Getting cached instance of repo') | |
|
1171 | 1170 | |
|
1172 | 1171 | if cache_map: |
|
1173 | 1172 | # get using prefilled cache_map |
@@ -1181,8 +1180,11 b' class Repository(Base, BaseModel):' | |||
|
1181 | 1180 | |
|
1182 | 1181 | if invalidate_repo is not None: |
|
1183 | 1182 | region_invalidate(_c, None, rn) |
|
1183 | log.debug('Cache for %s invalidated, getting new object' % (rn)) | |
|
1184 | 1184 | # update our cache |
|
1185 | 1185 | CacheInvalidation.set_valid(invalidate_repo.cache_key) |
|
1186 | else: | |
|
1187 | log.debug('Getting obj for %s from cache' % (rn)) | |
|
1186 | 1188 | return _c(rn) |
|
1187 | 1189 | |
|
1188 | 1190 | def __get_instance(self): |
@@ -1648,8 +1650,8 b' class CacheInvalidation(Base, BaseModel)' | |||
|
1648 | 1650 | self.cache_active = False |
|
1649 | 1651 | |
|
1650 | 1652 | def __unicode__(self): |
|
1651 | return u"<%s('%s:%s')>" % (self.__class__.__name__, | |
|
1652 |
|
|
|
1653 | return u"<%s('%s:%s[%s]')>" % (self.__class__.__name__, | |
|
1654 | self.cache_id, self.cache_key, self.cache_active) | |
|
1653 | 1655 | |
|
1654 | 1656 | def get_prefix(self): |
|
1655 | 1657 | """ |
General Comments 0
You need to be logged in to leave comments.
Login now