launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04307
Re: caching in model objects: please read
On Mon, 2010-08-16 at 16:16 +0100, Julian Edwards wrote:
> On Monday 16 August 2010 12:11:39 Robert Collins wrote:
> > In SQLBase classes, do not write __storm_invalidation__ hooks anymore:
> > just use cachedproperty, and its all taken care of for you. If you
> > do write a hook, be sure to upcall, or else cachedproperty caches
> > won't be cleared.
> >
> > If you are writing pure storm without SQLBase, either don't use
> > cachedproperty at all, or call clear_cachedproperties(self) in a storm
> > invalidation hook.
>
> Do you think it's a good use of our time to finally convert all our old-style
> model classes into pure Storm so we don't have this (and probably other)
> inconsistencies to have to remember?
These inconsistencies were quite confusing when I first started hacking
on Launchpad, and I'm still not entirely sure what they are..
There are about 200 classes derived from SQLBase left in all of
Launchpad:
registry: 47
code: 32
soyuz: 30
bugs: 21
translations: 16
other: 27
hardwaredb: 13
blueprints/answers: 17
Cheers,
Jelmer
Attachment:
signature.asc
Description: This is a digitally signed message part
References