Automatic cache clear for entity elements when doing CRUD operations?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Automatic cache clear for entity elements when doing CRUD operations?

Kumaraswamy nandipati
Hi.,

I am using cache for most of the times for entities (like
ProductCategoryMember, ProductCategory, Product, ShipmentMethod, etc.,) to
increase the application performance interms of database connections(hits).

Now question is
***When create, store or remove operations are done through the Entity
Engine, Does it be able to automatically clear any cache entries that might
contain the updated value???
*
Right now, its not happening to me. If I want to enable this feature, where
I need to change/edit the configurations. Please update me with the process
to implement this.

Thanks in Advance,


--
Kumaraswamy.N
ecomZera Online Services Pvt. Ltd.
Reply | Threaded
Open this post in threaded view
|

Re: Automatic cache clear for entity elements when doing CRUD operations?

Rishi Solanki
Hi Kumar,
UtilCache.clearAllCaches();
delegator.clearAllCaches();
The above methods will be your friends, but method is a shortcut to
completely clear all entity engine caches. For performance reasons this
should not be called very often.
But for sure other methods of UtilCache and delgator object will be of your
help.

Rishi Solanki
Enterprise Software Developer
HotWax Media Pvt. Ltd.


On Tue, Jan 5, 2010 at 9:40 AM, Kumaraswamy nandipati <
[hidden email]> wrote:

> Hi.,
>
> I am using cache for most of the times for entities (like
> ProductCategoryMember, ProductCategory, Product, ShipmentMethod, etc.,) to
> increase the application performance interms of database connections(hits).
>
> Now question is
> ***When create, store or remove operations are done through the Entity
> Engine, Does it be able to automatically clear any cache entries that might
> contain the updated value???
> *
> Right now, its not happening to me. If I want to enable this feature, where
> I need to change/edit the configurations. Please update me with the process
> to implement this.
>
> Thanks in Advance,
>
>
> --
> Kumaraswamy.N
> ecomZera Online Services Pvt. Ltd.
>
Reply | Threaded
Open this post in threaded view
|

Re: Automatic cache clear for entity elements when doing CRUD operations?

Kumaraswamy nandipati
Hi Rishi,

My previous question was not clear I think. Please *apologize* for this.
Here, I am writing in clear terms.

I am using 2 instances of ofbiz for one of my web application.
-First ofbiz instance points e-commerce module only.
-Second ofbiz instance used to represent all other modules(catalog, content,
partymgr, ordermgr, webtools etc.)

These two ofbiz instances hosted on different machines. Communications
configured by proxyPass calls at apache.

Here goes my problem, I enabled cache for retrieving ProductCategoryMembers.
Here, when ever I do any CRUD operations on this entity(i.e, *obiviously
happens in second ofbiz instance*), cache gets cleared for second instance
only. Its not getting cleared for first instance of Ofbiz. Otherwise I need
to wait for certain time on first instance(as per cache.properties file)
which is not relevant in this scenario.

To refresh cache in these two ofbiz instances at once what I supposed to do?
Is there any synchronization technique for this??

On Tue, Jan 5, 2010 at 11:41 AM, Rishi Solanki <[hidden email]>wrote:

> Hi Kumar,
> UtilCache.clearAllCaches();
> delegator.clearAllCaches();
> The above methods will be your friends, but method is a shortcut to
> completely clear all entity engine caches. For performance reasons this
> should not be called very often.
> But for sure other methods of UtilCache and delgator object will be of your
> help.
>
> Rishi Solanki
> Enterprise Software Developer
> HotWax Media Pvt. Ltd.
>
>
> On Tue, Jan 5, 2010 at 9:40 AM, Kumaraswamy nandipati <
> [hidden email]> wrote:
>
> > Hi.,
> >
> > I am using cache for most of the times for entities (like
> > ProductCategoryMember, ProductCategory, Product, ShipmentMethod, etc.,)
> to
> > increase the application performance interms of database
> connections(hits).
> >
> > Now question is
> > ***When create, store or remove operations are done through the Entity
> > Engine, Does it be able to automatically clear any cache entries that
> might
> > contain the updated value???
> > *
> > Right now, its not happening to me. If I want to enable this feature,
> where
> > I need to change/edit the configurations. Please update me with the
> process
> > to implement this.
> >
> > Thanks in Advance,
> >
> >
> > --
> > Kumaraswamy.N
> > ecomZera Online Services Pvt. Ltd.
> >
>



--
Thanks,
Kumaraswamy.N
ecomZera Online Services Pvt. Ltd.
Reply | Threaded
Open this post in threaded view
|

Re: Automatic cache clear for entity elements when doing CRUD operations?

Kumaraswamy nandipati
Hi.,

I am achieving this by using "Socket Connection" and streaming the
GenericValue objects which are need to be cache cleared in the other ofbiz
instance. Anyhow, there is no such strong cause to enable distributed
environment for OfBiz here, so, I chose "Socket Connection with Object
Streaming" decistion.

Please suggest me that, is there any other best way to achieve this??



On Tue, Jan 5, 2010 at 11:49 AM, Kumaraswamy nandipati <
[hidden email]> wrote:

> Hi Rishi,
>
> My previous question was not clear I think. Please *apologize* for this.
> Here, I am writing in clear terms.
>
> I am using 2 instances of ofbiz for one of my web application.
> -First ofbiz instance points e-commerce module only.
> -Second ofbiz instance used to represent all other modules(catalog,
> content, partymgr, ordermgr, webtools etc.)
>
> These two ofbiz instances hosted on different machines. Communications
> configured by proxyPass calls at apache.
>
> Here goes my problem, I enabled cache for retrieving
> ProductCategoryMembers. Here, when ever I do any CRUD operations on this
> entity(i.e, *obiviously happens in second ofbiz instance*), cache gets
> cleared for second instance only. Its not getting cleared for first instance
> of Ofbiz. Otherwise I need to wait for certain time on first instance(as per
> cache.properties file) which is not relevant in this scenario.
>
> To refresh cache in these two ofbiz instances at once what I supposed to
> do? Is there any synchronization technique for this??
>
>
> On Tue, Jan 5, 2010 at 11:41 AM, Rishi Solanki <[hidden email]>wrote:
>
>> Hi Kumar,
>> UtilCache.clearAllCaches();
>> delegator.clearAllCaches();
>> The above methods will be your friends, but method is a shortcut to
>> completely clear all entity engine caches. For performance reasons this
>> should not be called very often.
>> But for sure other methods of UtilCache and delgator object will be of
>> your
>> help.
>>
>> Rishi Solanki
>> Enterprise Software Developer
>> HotWax Media Pvt. Ltd.
>>
>>
>> On Tue, Jan 5, 2010 at 9:40 AM, Kumaraswamy nandipati <
>> [hidden email]> wrote:
>>
>> > Hi.,
>> >
>> > I am using cache for most of the times for entities (like
>> > ProductCategoryMember, ProductCategory, Product, ShipmentMethod, etc.,)
>> to
>> > increase the application performance interms of database
>> connections(hits).
>> >
>> > Now question is
>> > ***When create, store or remove operations are done through the Entity
>> > Engine, Does it be able to automatically clear any cache entries that
>> might
>> > contain the updated value???
>> > *
>> > Right now, its not happening to me. If I want to enable this feature,
>> where
>> > I need to change/edit the configurations. Please update me with the
>> process
>> > to implement this.
>> >
>> > Thanks in Advance,
>> >
>> >
>> > --
>> > Kumaraswamy.N
>> > ecomZera Online Services Pvt. Ltd.
>> >
>>
>
>
>
> --
> Thanks,
>
> Kumaraswamy.N
> ecomZera Online Services Pvt. Ltd.
>



--
Thanks,
Kumaraswamy.N
91-9866805250.