##// END OF EJS Templates
repo-feed: fix path-based permissions condition on caching element....
marcink -
r2740:77867d16 stable
parent child Browse files
Show More
@@ -152,13 +152,14 b' class RepoFeedView(RepoAppView):'
152 return _generate_feed()
152 return _generate_feed()
153
153
154 if self.path_filter.is_enabled:
154 if self.path_filter.is_enabled:
155 mime_type, feed = _generate_feed()
156 else:
155 invalidator_context = CacheKey.repo_context_cache(
157 invalidator_context = CacheKey.repo_context_cache(
156 _generate_feed_and_cache, self.db_repo_name, CacheKey.CACHE_TYPE_ATOM)
158 _generate_feed_and_cache, self.db_repo_name,
159 CacheKey.CACHE_TYPE_ATOM)
157 with invalidator_context as context:
160 with invalidator_context as context:
158 context.invalidate()
161 context.invalidate()
159 mime_type, feed = context.compute()
162 mime_type, feed = context.compute()
160 else:
161 mime_type, feed = _generate_feed()
162
163
163 response = Response(feed)
164 response = Response(feed)
164 response.content_type = mime_type
165 response.content_type = mime_type
@@ -204,14 +205,15 b' class RepoFeedView(RepoAppView):'
204 return _generate_feed()
205 return _generate_feed()
205
206
206 if self.path_filter.is_enabled:
207 if self.path_filter.is_enabled:
208 mime_type, feed = _generate_feed()
209 else:
207 invalidator_context = CacheKey.repo_context_cache(
210 invalidator_context = CacheKey.repo_context_cache(
208 _generate_feed_and_cache, self.db_repo_name, CacheKey.CACHE_TYPE_RSS)
211 _generate_feed_and_cache, self.db_repo_name,
212 CacheKey.CACHE_TYPE_RSS)
209
213
210 with invalidator_context as context:
214 with invalidator_context as context:
211 context.invalidate()
215 context.invalidate()
212 mime_type, feed = context.compute()
216 mime_type, feed = context.compute()
213 else:
214 mime_type, feed = _generate_feed()
215
217
216 response = Response(feed)
218 response = Response(feed)
217 response.content_type = mime_type
219 response.content_type = mime_type
General Comments 0
You need to be logged in to leave comments. Login now