You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by shree <ma...@satyam.com> on 2008/04/24 13:56:51 UTC

caching issue in retrieving records of an entity.


Hi all,

I am trying to retrieve records of an entity named "ProductPrice".

The code is as follows.
delegator.findByAndCache("ProductPrice",UtilMisc.toMap("productId",
productId));

It is supposed to get all the columns of that entity.
But sometimes ,getting the data of only one column.But after sometimes if I
refresh the page or restart the server, it is fetching the complete data
without any fail.

So I tested using findByAndCache for 10 newly created products, The sale
price was fetched only for  3  products and failed for 7 products.

And then I tested using findByAnd for 10 new products, the sale price was
being fetched all the time for all the 10 products.

So I concluded that It was the cache problem.

But i need to use findByAndCache only for better performance.

Can anyone suggest me, what might be causing this problem and how can I
solve it .

Regards,
Shree.

-- 
View this message in context: http://www.nabble.com/caching-issue-in-retrieving-records-of-an-entity.-tp16850199p16850199.html
Sent from the OFBiz - User mailing list archive at Nabble.com.


Re: caching issue in retrieving records of an entity.

Posted by Jacques Le Roux <ja...@les7arts.com>.
How have you set cache.properties ?
http://docs.ofbiz.org/display/OFBTECH/Apache+OFBiz+Technical+Production+Setup+Guide#ApacheOFBizTechnicalProductionSetupGuide-CacheSettings

Jacques

From: "shree" <ma...@satyam.com>
>
>
> Hi all,
>
> I am trying to retrieve records of an entity named "ProductPrice".
>
> The code is as follows.
> delegator.findByAndCache("ProductPrice",UtilMisc.toMap("productId",
> productId));
>
> It is supposed to get all the columns of that entity.
> But sometimes ,getting the data of only one column.But after sometimes if I
> refresh the page or restart the server, it is fetching the complete data
> without any fail.
>
> So I tested using findByAndCache for 10 newly created products, The sale
> price was fetched only for  3  products and failed for 7 products.
>
> And then I tested using findByAnd for 10 new products, the sale price was
> being fetched all the time for all the 10 products.
>
> So I concluded that It was the cache problem.
>
> But i need to use findByAndCache only for better performance.
>
> Can anyone suggest me, what might be causing this problem and how can I
> solve it .
>
> Regards,
> Shree.
>
> -- 
> View this message in context: http://www.nabble.com/caching-issue-in-retrieving-records-of-an-entity.-tp16850199p16850199.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>