← Back to team overview

launchpad-dev team mailing list archive

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

 

On Mon, May 9, 2011 at 10:31 PM, Gavin Panella
<gavin.panella@xxxxxxxxxxxxx> wrote:
> 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.

We may want to disable the generational cache - we don't reuse objects
from request to request, and in one request its entirely reasonable to
load up all thats needed at once.


References