On Fri, Sep 10, 2010 at 12:50 AM, Curtis Hovey
<[email protected]> wrote:
> The cache is populated with TeamParticipation information. We know the db was
> not hit if no information from the db request was cached
This is a bit of a surrogate. Can I suggest the following:
add
Store.of(self.user).invalidate()
before your call that shouldn't do db (makes the storm cache invalid
and also (because we hook in) ICachedProperties are cleared.
and use
self.assertFalse(
self.assertStatementCount(0, self.user.inTeam, other_user))
which directly checks that no db statements happen.
-Rob
--
https://code.launchpad.net/~sinzui/launchpad/inteam-db-calls-0/+merge/34932
Your team Launchpad code reviewers is requested to review the proposed merge of
lp:~sinzui/launchpad/inteam-db-calls-0 into lp:launchpad/devel.
_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help : https://help.launchpad.net/ListHelp