Merge lp:~stub/launchpad/bug-602936-hotbug-caching into lp:launchpad

Proposed by Stuart Bishop
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 11302
Proposed branch: lp:~stub/launchpad/bug-602936-hotbug-caching
Merge into: lp:launchpad
Diff against target: 50 lines (+1/-21)
2 files modified
lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt (+0/-18)
lib/lp/bugs/templates/bugtarget-bugs.pt (+1/-3)
To merge this branch: bzr merge lp:~stub/launchpad/bug-602936-hotbug-caching
Reviewer Review Type Date Requested Status
Robert Collins (community) Approve
Review via email: mp+31735@code.launchpad.net

Commit message

Turn off caching of the the 'hotbugs' list

Description of the change

Turn off caching the 'hotbugs' list as it annoys some people and likely isn't saving us much.

To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt'
--- lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt 2010-06-09 14:01:54 +0000
+++ lib/lp/bugs/stories/bugs/xx-product-bugs-page.txt 2010-08-05 07:11:10 +0000
@@ -153,11 +153,6 @@
153For each bug we have the number, title, status, importance and the time153For each bug we have the number, title, status, importance and the time
154since the last update.154since the last update.
155155
156Note: since the hot bugs list is cached, we have to clear the cache first to
157get the results we expect.
158
159 >>> from canonical.testing.layers import MemcachedLayer
160 >>> MemcachedLayer.purge()
161 >>> anon_browser.open('http://bugs.launchpad.dev/firefox')156 >>> anon_browser.open('http://bugs.launchpad.dev/firefox')
162 >>> print extract_text(157 >>> print extract_text(
163 ... find_tag_by_id(anon_browser.contents, 'hot-bugs'))158 ... find_tag_by_id(anon_browser.contents, 'hot-bugs'))
@@ -185,19 +180,6 @@
185 ... BugTaskStatus.FIXRELEASED, project_owner)180 ... BugTaskStatus.FIXRELEASED, project_owner)
186 >>> logout()181 >>> logout()
187182
188The hot bugs list is cached to help page performance, so these changes are not
189immediately visible.
190
191 >>> 'cache:private 10 minute' in anon_browser.contents
192 True
193 >>> anon_browser.reload()
194 >>> 'Summary for new bug 3' in anon_browser.contents
195 True
196
197Once the cache has cleared, which we do manually here in the test,
198the Fix Released bug, bug 18, is no longer shown.
199
200 >>> MemcachedLayer.purge()
201 >>> anon_browser.reload()183 >>> anon_browser.reload()
202 >>> print extract_text(184 >>> print extract_text(
203 ... find_tag_by_id(anon_browser.contents, 'hot-bugs'))185 ... find_tag_by_id(anon_browser.contents, 'hot-bugs'))
204186
=== modified file 'lib/lp/bugs/templates/bugtarget-bugs.pt'
--- lib/lp/bugs/templates/bugtarget-bugs.pt 2010-06-15 19:37:37 +0000
+++ lib/lp/bugs/templates/bugtarget-bugs.pt 2010-08-05 07:11:10 +0000
@@ -107,9 +107,7 @@
107 --></script>107 --></script>
108 </tal:has_bugtasks>108 </tal:has_bugtasks>
109109
110 <tal:has_hot_bugs condition="view/hot_bugs_info/bugtasks"110 <tal:has_hot_bugs condition="view/hot_bugs_info/bugtasks">
111 content="cache:private, 10 minute">
112 <!-- hot_bugs_info/bugtasks cache:private 10 minute -->
113 <h2>Hot bugs</h2>111 <h2>Hot bugs</h2>
114112
115 <table class="listing" id="hot-bugs"113 <table class="listing" id="hot-bugs"