Merge lp:~leonardr/launchpad/toggle-representation-cache into lp:launchpad
| Status: | Merged |
|---|---|
| Approved by: | Graham Binns on 2010-06-08 |
| Approved revision: | no longer in the source branch. |
| Merged at revision: | 11011 |
| Proposed branch: | lp:~leonardr/launchpad/toggle-representation-cache |
| Merge into: | lp:launchpad |
| Diff against target: |
513 lines (+331/-9) 14 files modified
configs/development/launchpad-lazr.conf (+3/-0) lib/canonical/config/schema-lazr.conf (+3/-0) lib/canonical/database/sqlbase.py (+7/-0) lib/canonical/launchpad/pagetests/webservice/cache.txt (+77/-0) lib/canonical/launchpad/rest/configuration.py (+4/-0) lib/canonical/launchpad/testing/pages.py (+12/-0) lib/canonical/launchpad/zcml/webservice.zcml (+5/-0) lib/lp/registry/stories/webservice/xx-project-registry.txt (+2/-0) lib/lp/services/memcache/doc/restful-cache.txt (+143/-0) lib/lp/services/memcache/restful.py (+63/-0) lib/lp/services/memcache/tests/test_doc.py (+8/-8) lib/lp/soyuz/stories/webservice/xx-builds.txt (+1/-0) lib/lp/soyuz/stories/webservice/xx-source-package-publishing.txt (+2/-0) versions.cfg (+1/-1) |
| To merge this branch: | bzr merge lp:~leonardr/launchpad/toggle-representation-cache |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Aaron Bentley (community) | Approve on 2010-06-14 | ||
| Graham Binns (community) | code | Approve on 2010-06-08 | |
| Paul Hummer (community) | code | Approve on 2010-06-03 | |
| Jelmer Vernooij (community) | code | 2010-06-03 | Approve on 2010-06-03 |
|
Review via email:
|
|||
Description of the Change
This branch implements the enable_
| Leonard Richardson (leonardr) wrote : | # |
I need another review of the last couple revisions. While going through stub's review of my earlier branch, I remembered that we planned to set a default expiration time for items in the cache, so that when we tested on staging the cache wouldn't contain bad data indefinitely. I've implemented that code and a test, as well as responding to Jelmer's feedback and some more of Stuart's.
(Stuart's review is here: https:/
I couldn't think of any way to test the expiration except from actually sleeping for 2 seconds, since I don't think we have a mocked-up memcached for use in testing. Suggestions are welcome.
| Leonard Richardson (leonardr) wrote : | # |
I need one more tiny review. I got a lots of test failures because memcached thinks space is a control character. So after creating the key, I replace any spaces with periods.
| Leonard Richardson (leonardr) wrote : | # |
I was still getting test failures, so I made a number of changes (which required a new version of lazr.restful: see https:/
| Aaron Bentley (abentley) wrote : | # |
As discussed in IRC
- Please catch storm.exception
- If possible, narrow the scope of the related try/except block.
- Please be more specific in applying defaults, so that cached values that evaluate to False are handled correctly.

In lib/lp/ services/ memcache/ doc/restful- cache.txt you're missing an asterisk on the first line.
It'd be nice to have docstrings for the methods in MemcachedStormR epresentationCa che, even if they just say "See `BaseRepository Cache`. "