Query about Cache in groovy

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

Query about Cache in groovy

Pankaj.Jain
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.

______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Query about Cache in groovy

David E. Jones-2

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.
>
> ______________________________________________________________________

Reply | Threaded
Open this post in threaded view
|

RE: Query about Cache in groovy

Pankaj.Jain
But it is taking expire time as 0, that means the component in cache will never expire.

-----Original Message-----
From: David E Jones [mailto:[hidden email]]
Sent: Friday, December 11, 2009 3:53 PM
To: [hidden email]
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.

______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

RE: Query about Cache in groovy

Pankaj.Jain
In reply to this post by David E. Jones-2
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:[hidden email]]
Sent: Friday, December 11, 2009 3:53 PM
To: [hidden email]
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.

______________________________________________________________________
Reply | Threaded
Open this post in threaded view
|

Re: Query about Cache in groovy

Jacques Le Roux
Administrator
In reply to this post by Pankaj.Jain
I guess there is mechanism somewhere which flushes the cache in case of change (be for groovy or everything else).

Jacques

From: "Pankaj Jain" <[hidden email]>

> But it is taking expire time as 0, that means the component in cache will never expire.
>
> -----Original Message-----
> From: David E Jones [mailto:[hidden email]]
> Sent: Friday, December 11, 2009 3:53 PM
> To: [hidden email]
> 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.
>
> ______________________________________________________________________
>