On 6/12/2010, at 6:21 PM, Adam Heath wrote:

> Adrian Crum wrote:
>> I agree with David. An example is the advice he gave me during the 
>> development of temporal expressions.
>> 
>> I wanted to cache the temporal expression Java structures in memory. David 
>> suggested getting the persisted expressions from the entity cache instead. 
>> Thinking about it, that made sense - temporal expressions should not change 
>> frequently so they are good candidates for entity caching.
> 
> Storing them in the entity cache *is* storing them in memory.  Are you
> iterating the entity values, building up some complex object?  If so,
> then use Delegator.getCache().put(String, EntityCondition, String,
> Object).  That allows you to add a complex built-up java object into
> the same internal cache that is storing the list of cached results
> from a condition lookup.

Thanks for pointing this out, I wasn't aware of it and I can think of a fair 
few places where something like this could be put to use.  Using it in place of 
some of the recent fixes to caching of freemarker template objects originating 
from Content records is the first that comes to mind.

Regards
Scott

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to