You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Pankaj Jain <Pa...@lntinfotech.com> on 2009/12/11 11:20:50 UTC

Query about Cache in groovy

Hi

In ofbiz, when we use a groovy file , in ist call to groovy, .groovy file is read and parsed and then we store the generated class file in a cache and after that for every next call to groovy, we refer the cache to get the class file. But if we update the .groovy files at run time, the changes works fine. I am not getting this b'coz after ist call we always refer cache to get the script class file. we every time don't create the class file.

How it is being done? The same thing is happening in some simple methods and in ftl files also. Please help ????

Pankaj jain

________________________________
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.

______________________________________________________________________

RE: Query about Cache in groovy

Posted by Pankaj Jain <Pa...@lntinfotech.com>.
Hi David

One more thing, in cache.properties file we have mentioned cache expire time for generally all caches (be it groovy, simple method etc) is 10000 (ie 10 secs), Is that means all cache will expire in 10 seconds after their creation?? Means if we get two calls for same groovy with in 10 sec interval, we will use the script class file from cache, right? and after each 10 sec we will create script class file again, use it and place it in cache.

Pankaj

-----Original Message-----
From: David E Jones [mailto:dejc@me.com]
Sent: Friday, December 11, 2009 3:53 PM
To: user@ofbiz.apache.org
Subject: Re: Query about Cache in groovy


By default there is a timeout on this cache.

-David


On Dec 11, 2009, at 4:20 AM, Pankaj Jain wrote:

> Hi
>
> In ofbiz, when we use a groovy file , in ist call to groovy, .groovy file is read and parsed and then we store the generated class file in a cache and after that for every next call to groovy, we refer the cache to get the class file. But if we update the .groovy files at run time, the changes works fine. I am not getting this b'coz after ist call we always refer cache to get the script class file. we every time don't create the class file.
>
> How it is being done? The same thing is happening in some simple methods and in ftl files also. Please help ????
>
> Pankaj jain
>
> ________________________________
> This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
>
> ______________________________________________________________________


______________________________________________________________________

This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.

______________________________________________________________________

Re: Query about Cache in groovy

Posted by Jacques Le Roux <ja...@les7arts.com>.
I guess there is mechanism somewhere which flushes the cache in case of change (be for groovy or everything else).

Jacques

From: "Pankaj Jain" <Pa...@lntinfotech.com>
> But it is taking expire time as 0, that means the component in cache will never expire.
>
> -----Original Message-----
> From: David E Jones [mailto:dejc@me.com]
> Sent: Friday, December 11, 2009 3:53 PM
> To: user@ofbiz.apache.org
> Subject: Re: Query about Cache in groovy
>
>
> By default there is a timeout on this cache.
>
> -David
>
>
> On Dec 11, 2009, at 4:20 AM, Pankaj Jain wrote:
>
>> Hi
>>
>> In ofbiz, when we use a groovy file , in ist call to groovy, .groovy file is read and parsed and then we store the generated 
>> class file in a cache and after that for every next call to groovy, we refer the cache to get the class file. But if we update 
>> the .groovy files at run time, the changes works fine. I am not getting this b'coz after ist call we always refer cache to get 
>> the script class file. we every time don't create the class file.
>>
>> How it is being done? The same thing is happening in some simple methods and in ftl files also. Please help ????
>>
>> Pankaj jain
>>
>> ________________________________
>> This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended 
>> recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
>>
>> ______________________________________________________________________
>
>
> ______________________________________________________________________
>
> This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended 
> recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
>
> ______________________________________________________________________
> 



RE: Query about Cache in groovy

Posted by Pankaj Jain <Pa...@lntinfotech.com>.
But it is taking expire time as 0, that means the component in cache will never expire.

-----Original Message-----
From: David E Jones [mailto:dejc@me.com]
Sent: Friday, December 11, 2009 3:53 PM
To: user@ofbiz.apache.org
Subject: Re: Query about Cache in groovy


By default there is a timeout on this cache.

-David


On Dec 11, 2009, at 4:20 AM, Pankaj Jain wrote:

> Hi
>
> In ofbiz, when we use a groovy file , in ist call to groovy, .groovy file is read and parsed and then we store the generated class file in a cache and after that for every next call to groovy, we refer the cache to get the class file. But if we update the .groovy files at run time, the changes works fine. I am not getting this b'coz after ist call we always refer cache to get the script class file. we every time don't create the class file.
>
> How it is being done? The same thing is happening in some simple methods and in ftl files also. Please help ????
>
> Pankaj jain
>
> ________________________________
> This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
>
> ______________________________________________________________________


______________________________________________________________________

This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.

______________________________________________________________________

Re: Query about Cache in groovy

Posted by David E Jones <de...@me.com>.
By default there is a timeout on this cache.

-David


On Dec 11, 2009, at 4:20 AM, Pankaj Jain wrote:

> Hi
> 
> In ofbiz, when we use a groovy file , in ist call to groovy, .groovy file is read and parsed and then we store the generated class file in a cache and after that for every next call to groovy, we refer the cache to get the class file. But if we update the .groovy files at run time, the changes works fine. I am not getting this b'coz after ist call we always refer cache to get the script class file. we every time don't create the class file.
> 
> How it is being done? The same thing is happening in some simple methods and in ftl files also. Please help ????
> 
> Pankaj jain
> 
> ________________________________
> This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
> 
> ______________________________________________________________________