[OFBiz] Dev - caching questions

Si Chen schen at graciousstyle.com
Thu Sep 23 18:37:34 EDT 2004


Hi Adam,

Since each product has several content types, my original plan was to 
create a separate cache for each content type and use the primary key of 
the product to access it.  To fit all these caches into one class, I 
made a Map of caches in ProductContentWrapper.  Hence the added layer.

However, as you see from David's email, I forgot about the mimeTypes 
(and possibly locale as well?)  So I think at this point, it would be 
better to use a constructed string for keys.  Does this make sense?

Also, what do you mean by "condition as the key in the util cache"? 

Si

Adam Heath wrote:

>yOn Thu, 23 Sep 2004, Si Chen wrote:
>
>  
>
>>Hi David,
>>
>>Thanks.  I am creating here a HashMap of contentTypeId -> contentCaches,
>>each of which is a UtilCache object.  Then when the contentTypeId is
>>requested, I am going into the HashMap to get the UtilCache for that
>>contentTypeId and using the get, put methods on the UtilCache.  Do you
>>think there is another way to make many caches available for all the
>>possible content types?
>>    
>>
>
>My cache work uses a primaryKey, or condition, as the key in the util cache.
>What is wrong with that, for what you are doing?
> 
>_______________________________________________
>Dev mailing list
>Dev at lists.ofbiz.org
>http://lists.ofbiz.org/mailman/listinfo/dev
>
>  
>


More information about the Dev mailing list