← Back to team overview

launchpad-dev team mailing list archive

Re: Block the use of non-cached References on model objects

 

On 4 May 2011 20:15, Jamu Kakar <jkakar@xxxxxxxx> wrote:
> I wonder if this kind of complexity is really necessary (long term)

I'm not sure if it's necessary long term, but short to medium term it
may be useful to help avoid and prevent the reoccurrence of a pattern
that is convenient but can be very harmful to performance.

> given that we have a Store.block_access method?  When block_access is
> called any access to the underlying connection will result in a
> ConnectionBlockedError being raised.  Anyway, just a thought.

Reference.blocked() and .unblocked() both use the same mechanism as
Store.block_access() and .unblock_access(), though at a slightly lower
level.


References