launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #00761
[Merge] lp:~sinzui/launchpad/mailing-list-subscribers-cache-0 into lp:launchpad/devel
Curtis Hovey has proposed merging lp:~sinzui/launchpad/mailing-list-subscribers-cache-0 into lp:launchpad/devel.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
This is my branch to adjust the cache rules showing mailing list
subscriptions.
lp:~sinzui/launchpad/mailing-list-subscribers-cache-0
Diff size: 26
Launchpad bug:
https://bugs.launchpad.net/bugs/623083
Test command: ./bin/test -vv \
-t test_person_view -t xx-team-membership
-t mailinglists/subscriptions
Pre-implementation: no one
Target release: 10.09
Adjust the cache rules showing mailing list subscriptions
---------------------------------------------------------
<beuno>
I had the following problem:
- Someone signs up for a mailing list
- I look at the current subscribers and that person isn't listed, however,
they can see that they *are* subscribed
- Disabling the edge redirect and going to production shows the updated data
I waited for at least 10 minutes for this to be updated.
<sinzui>
We just completed our query optimisations for this page so we can consider
changing the cache rules. I propose caching for 10 minutes for anonymous users
only. Logged in users are working so they expect to see changes.
We should also update +participation since its queries were also updated. We
should use anonymous as well because logged in users are currently getting a
private cache, which is not very helpful.
Rules
-----
* Update +subscribers to cache anonymous only.
* Update +participation to cache anonymous only.
QA
--
* Visit your +participation page as an anonymous user.
* Follow a link to a team that you are subscribed too.
* View the list of subscribers and find yourself.
* Visit your +participation page as yourself.
* Follow a link to a team that you are subscribed too.
* View the list of subscribers and find yourself.
* Return to your profile page and choose edit emails.
* Unsubscribe from the list under test.
* Visit your +participation page as yourself.
* Verify you are not listed as subscribed.
* Visit the team and look at the subscribers page
* Verify you are not listed.
* Visit your +participation page as an anonymous user.
* Verify you are still listed as subscribed
* Follow a link to a team that you are subscribed too.
* View the list of subscribers and find yourself.
* Wait 10 minutes.
* Visit your +participation page as an anonymous user.
* Verify you are not listed as subscribed.
* Follow a link to a team that you are subscribed too.
* View the list of subscribers verify you are not in the list.
Lint
----
Linting changed files:
lib/lp/registry/templates/person-participation.pt
lib/lp/registry/templates/team-mailinglist-subscribers.pt
Test
----
No tests changed. The existing tests verify that cache rules are present,
but they do not concern themselves with the exact condition.
Implementation
--------------
Changed the cache to anonymous, 10 minutes in:
* lib/lp/registry/templates/person-participation.pt
* lib/lp/registry/templates/team-mailinglist-subscribers.pt
--
https://code.launchpad.net/~sinzui/launchpad/mailing-list-subscribers-cache-0/+merge/33681
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~sinzui/launchpad/mailing-list-subscribers-cache-0 into lp:launchpad/devel.
=== modified file 'lib/lp/registry/templates/person-participation.pt'
--- lib/lp/registry/templates/person-participation.pt 2010-08-10 20:15:18 +0000
+++ lib/lp/registry/templates/person-participation.pt 2010-08-25 18:56:04 +0000
@@ -32,7 +32,7 @@
tal:condition="not: context/teamowner">Mailing List</th>
</tr>
</thead>
- <tbody tal:content="cache:private, 30 minute">
+ <tbody tal:content="cache:anonymous, 10 minute">
<tr tal:repeat="participation view/active_participations">
<td>
<a tal:replace="structure participation/team/fmt:link">name</a>
=== modified file 'lib/lp/registry/templates/team-mailinglist-subscribers.pt'
--- lib/lp/registry/templates/team-mailinglist-subscribers.pt 2010-06-24 18:49:11 +0000
+++ lib/lp/registry/templates/team-mailinglist-subscribers.pt 2010-08-25 18:56:04 +0000
@@ -16,7 +16,7 @@
<tal:has-subscribers condition="view/subscribers/currentBatch">
<p>The following people are subscribed to the team mailing list and
will receive email messages sent to the list.</p>
- <tal:cache content="cache:public, 60 minute">
+ <tal:cache content="cache:anonymous, 10 minute">
<tal:subscribers replace="structure view/renderTable" />
</tal:cache>
<br />