Merge lp:~lifeless/launchpad/cachedproperty into lp:launchpad
Proposed by
Robert Collins
Status: | Merged |
---|---|
Approved by: | Michael Hudson-Doyle |
Approved revision: | no longer in the source branch. |
Merged at revision: | 11366 |
Proposed branch: | lp:~lifeless/launchpad/cachedproperty |
Merge into: | lp:launchpad |
Diff against target: |
419 lines (+179/-20) 9 files modified
lib/canonical/cachedproperty.py (+145/-4) lib/canonical/database/sqlbase.py (+12/-0) lib/canonical/launchpad/database/librarian.py (+1/-0) lib/lp/registry/doc/teammembership.txt (+2/-1) lib/lp/registry/model/distribution.py (+4/-3) lib/lp/registry/model/person.py (+10/-10) lib/lp/registry/model/product.py (+1/-2) lib/lp/translations/model/potemplate.py (+1/-0) lib/lp/translations/model/potmsgset.py (+3/-0) |
To merge this branch: | bzr merge lp:~lifeless/launchpad/cachedproperty |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Hudson-Doyle | Approve | ||
Review via email: mp+32728@code.launchpad.net |
Commit message
Automatically clear cachedproperties on SQLBase derived classes when storm invalidates an object.
Description of the change
Make invalidation of cached properties on SQLBase derived classes automatic. This addresses many of the risks associated with using them in the test suite (the server already discards all such objects between transactions), leaving just read-write-readback cases to handle as and when they occur.
To post a comment you must log in.
Hi,
This looks good. I'm not sure what value there is in initializing _cached_properties in SQLBase.__init__ is -- seems to slightly increase coupling.
Generally, yay for safer-by-default.
Cheers,
mwh