launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #07059
Re: Block the use of non-cached References on model objects
On 7 May 2011 14:51, Jeroen Vermeulen <jtv@xxxxxxxxxxxxx> wrote:
> On 2011-05-04 08:32, Gavin Panella wrote:
>
>> One approach to improving this situation could be to forbid (with
>> code) the use of Reference properties that are not already cached (in
>> the store cache; this is nothing to do with @cachedproperty).
>
> I'm a bit worried about the unusual cases: rarely-executed code paths,
> unusual data, data that is usually cached but sometimes isn't, data that
> falls out of the cache at an awkward moment.
Good point; this could be a problem with GenerationalCache. If many
objects are loaded, and push things out of the cache such that they
are garbage collected, code paths that might have been "fenced off"
with this function in development might start failing in production.
Follow ups
References