Merge lp:~sinzui/launchpad/registry-cache-3 into lp:launchpad
Status: | Merged |
---|---|
Approved by: | Edwin Grubbs |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11087 |
Proposed branch: | lp:~sinzui/launchpad/registry-cache-3 |
Merge into: | lp:launchpad |
Diff against target: |
283 lines (+142/-54) 6 files modified
lib/lp/registry/browser/tests/milestone-views.txt (+1/-50) lib/lp/registry/browser/tests/test_milestone.py (+64/-0) lib/lp/registry/browser/tests/test_packaging.py (+35/-0) lib/lp/registry/templates/distroseries-needs-packaging.pt (+3/-2) lib/lp/registry/templates/distroseries-packaging.pt (+3/-2) lib/lp/testing/memcache.py (+36/-0) |
To merge this branch: | bzr merge lp:~sinzui/launchpad/registry-cache-3 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Edwin Grubbs (community) | Approve | ||
Review via email: mp+28931@code.launchpad.net |
Description of the change
This is my branch to fix the +packaging and +needs-packaging cache rule.
lp:~sinzui/launchpad/registry-cache-3
Diff size: 284
Launchpad bug:
https:/
Test command: ./bin/test -vv \
-t packaging-views \
-t xx-sourcepackag
Pre-
Target release: 10.06
Fix the +packaging and +needs-packaging cache rule
-------
The pages still timeout on edge and staging even though the caching was added.
The cache rule was applied to the repeat statement, which means the view
always calls the expensive query, then uses the cache for the item.
Rules
-----
* Move the cache rule before the call to `batch` to ensure the entire
listing is cached. The batch will be called again when the cache
expires.
* ADDENDUM: Add a memcache test helper so that it is easy to verify
that a fragment is in the cache chunk.
QA
--
* Visit https:/
* Load the page (the test does not start until it is fully loaded)
* Reload the page 10 times and verify there are no timeouts.
* Visit https:/
* Load the page (the test does not start until it is fully loaded)
* Reload the page 10 times and verify there are no timeouts.
Lint
----
Linting changed files:
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
lib/lp/
Test
----
* lib/lp/
* Added a test fixture for memcache testing.
* lib/lp/
* Added tests to verify the whole table is in the cache chunk for
+packaging and +needs-packaging.
* lib/lp/
* Moved cache tests to test_milestone.py
* lib/lp/
* Updated tests to use the new memcache unit test fixture.
Implementation
--------------
* lib/lp/
* Move cache rule to the whole table to ensure batch is not called
if there is a cache hit.
* lib/lp/
* Move cache rule to the whole table to ensure batch is not called
if there is a cache hit.
Hi Curtis,
This branch looks good.
-Edwin