launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #04302
Re: caching in model objects: please read
On Tue, Aug 17, 2010 at 3:16 AM, Julian Edwards
<julian.edwards@xxxxxxxxxxxxx> 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?
I don't know. I wonder if perhaps we still want a base class with
things like this invalidation hook pre-baked into it, and if so, isn't
SQLBase an ok base class? we can use storm syntax on top of it, after
all.
-Rob
Follow ups
References