You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Len Shein <ls...@salmonllc.com> on 2013/01/24 22:50:25 UTC

Cache Clearing

 

I have all the cache.properties set to never expire (commented out), however
it seems after I have built up cache at some point the cache is cleared.  I
have noticed it consistently clears the next day (about a 10 hour window)
even if there are no users on the site. 

 

Does anyone have any experience with the cache and what are the causes for
it to be cleared?

 

 

 

Thank You

 

Len Shein

 

lshein@salmonllc.com

lshein@verizon.net

 

516.742.7888 ext.225

732.333.4303

 


Re: Cache Clearing

Posted by Jacques Le Roux <ja...@les7arts.com>.
I did not look into all details of cache implementation. 
But it seems to me that, if nothing is defined, the default values (defined in UtilCache class) are used

They are:
expireTimeNanos = 0;
useSoftReference = false;
sizeLimit = 0;
etc.

Jacques

From: "Len Shein" <ls...@salmonllc.com>
>I ran some further tests and found the following:
> Where 'entity' cache is concerned commenting out (cache.properties) the
> entries (or no entries at all); the system will 'clear' the cache out at a
> certain point, I am assuming when GC is run.  
> 
> If a specific entity is defined to have no expire time and 'false' to use
> soft reference then the built up cache is NOT cleared and built up cache
> remains.
> 
> In summary the best approach to cache would be to specifically define the
> entities in the cache properties file as 'expire time = 0', 'soft reference
> = false' for the main entities used in rendering a site.
> 
> In my testing I set the cache.properties for the following entities, all
> other entries were commented out:
> Note: There is a comment in the property file stating (for better
> performance cache lines should be commented out)?
> 
> # Examples for per-delegator Entity Engine cache settings
> 
> entitycache.entity-list.default.ProductAssoc.useSoftReference=false
> entitycache.entity-list.default.ProductAssoc.expireTime=0
> entitycache.entity-list.default.ProductAssoc.maxSize=0
> 
> entitycache.entity-list.default.ProductCategoryMember.useSoftReference=false
> entitycache.entity-list.default.ProductCategoryMember.expireTime=0
> entitycache.entity-list.default.ProductCategoryMember.maxSize=0
> 
> entitycache.entity-list.default.ProductCategoryRollup.useSoftReference=false
> entitycache.entity-list.default.ProductCategoryRollup.expireTime=0
> entitycache.entity-list.default.ProductCategoryRollup.maxSize=0
> 
> entitycache.entity-list.default.ProductContent.useSoftReference=false
> entitycache.entity-list.default.ProductContent.expireTime=0
> entitycache.entity-list.default.ProductContent.maxSize=0
> 
> entitycache.entity-list.default.ProductFeatureAndAppl.useSoftReference=false
> entitycache.entity-list.default.ProductFeatureAndAppl.expireTime=0
> entitycache.entity-list.default.ProductFeatureAndAppl.maxSize=0
> 
> entitycache.entity-list.default.ProductPriceRule.useSoftReference=false
> entitycache.entity-list.default.ProductPriceRule.expireTime=0
> entitycache.entity-list.default.ProductPriceRule.maxSize=0
> 
> entitycache.entity-list.default.ProductPrice.useSoftReference=false
> entitycache.entity-list.default.ProductPrice.expireTime=0
> entitycache.entity-list.default.ProductPrice.maxSize=0
> 
> entitycache.entity-list.default.ProductPriceCond.useSoftReference=false
> entitycache.entity-list.default.ProductPriceCond.expireTime=0
> entitycache.entity-list.default.ProductPriceCond.maxSize=0
> 
> entitycache.entity.default.Product.useSoftReference=false
> entitycache.entity.default.Product.expireTime=0
> entitycache.entity.default.Product.maxSize=0
> 
> entitycache.entity.default.ProductCaclulatedInfo.useSoftReference=false
> entitycache.entity.default.ProductCaclulatedInfo.expireTime=0
> entitycache.entity.default.ProductCaclulatedInfo.maxSize=0
> 
> entitycache.entity.default.ProductPriceRule.useSoftReference=false
> entitycache.entity.default.ProductPriceRule.expireTime=0
> entitycache.entity.default.ProductPriceRule.maxSize=0
> 
> product.content.rendered.useSoftReference=false
> product.content.rendered.expireTime=0
> product.content.rendered.maxSize=0
> 
> 
> -----Original Message-----
> From: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com] 
> Sent: Friday, January 25, 2013 3:51 AM
> To: user@ofbiz.apache.org
> Subject: Re: Cache Clearing
> 
> I never noticed that, a good way to share would be to check on trunk demo
> 
> Jacques
> 
> From: "Len Shein" <ls...@salmonllc.com>
>> I have all the cache.properties set to never expire (commented out),
> however
>> it seems after I have built up cache at some point the cache is cleared.
> I
>> have noticed it consistently clears the next day (about a 10 hour window)
>> even if there are no users on the site. 
>> 
>> 
>> 
>> Does anyone have any experience with the cache and what are the causes for
>> it to be cleared?
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> Thank You
>> 
>> 
>> 
>> Len Shein
>> 
>> 
>> 
>> lshein@salmonllc.com
>> 
>> lshein@verizon.net
>> 
>> 
>> 
>> 516.742.7888 ext.225
>> 
>> 732.333.4303
>> 
>> 
>> 
>>
>

RE: Cache Clearing

Posted by Len Shein <ls...@salmonllc.com>.
I ran some further tests and found the following:
Where 'entity' cache is concerned commenting out (cache.properties) the
entries (or no entries at all); the system will 'clear' the cache out at a
certain point, I am assuming when GC is run.  

If a specific entity is defined to have no expire time and 'false' to use
soft reference then the built up cache is NOT cleared and built up cache
remains.

In summary the best approach to cache would be to specifically define the
entities in the cache properties file as 'expire time = 0', 'soft reference
= false' for the main entities used in rendering a site.

In my testing I set the cache.properties for the following entities, all
other entries were commented out:
Note: There is a comment in the property file stating (for better
performance cache lines should be commented out)?

# Examples for per-delegator Entity Engine cache settings

entitycache.entity-list.default.ProductAssoc.useSoftReference=false
entitycache.entity-list.default.ProductAssoc.expireTime=0
entitycache.entity-list.default.ProductAssoc.maxSize=0

entitycache.entity-list.default.ProductCategoryMember.useSoftReference=false
entitycache.entity-list.default.ProductCategoryMember.expireTime=0
entitycache.entity-list.default.ProductCategoryMember.maxSize=0

entitycache.entity-list.default.ProductCategoryRollup.useSoftReference=false
entitycache.entity-list.default.ProductCategoryRollup.expireTime=0
entitycache.entity-list.default.ProductCategoryRollup.maxSize=0

entitycache.entity-list.default.ProductContent.useSoftReference=false
entitycache.entity-list.default.ProductContent.expireTime=0
entitycache.entity-list.default.ProductContent.maxSize=0

entitycache.entity-list.default.ProductFeatureAndAppl.useSoftReference=false
entitycache.entity-list.default.ProductFeatureAndAppl.expireTime=0
entitycache.entity-list.default.ProductFeatureAndAppl.maxSize=0

entitycache.entity-list.default.ProductPriceRule.useSoftReference=false
entitycache.entity-list.default.ProductPriceRule.expireTime=0
entitycache.entity-list.default.ProductPriceRule.maxSize=0

entitycache.entity-list.default.ProductPrice.useSoftReference=false
entitycache.entity-list.default.ProductPrice.expireTime=0
entitycache.entity-list.default.ProductPrice.maxSize=0

entitycache.entity-list.default.ProductPriceCond.useSoftReference=false
entitycache.entity-list.default.ProductPriceCond.expireTime=0
entitycache.entity-list.default.ProductPriceCond.maxSize=0

entitycache.entity.default.Product.useSoftReference=false
entitycache.entity.default.Product.expireTime=0
entitycache.entity.default.Product.maxSize=0

entitycache.entity.default.ProductCaclulatedInfo.useSoftReference=false
entitycache.entity.default.ProductCaclulatedInfo.expireTime=0
entitycache.entity.default.ProductCaclulatedInfo.maxSize=0

entitycache.entity.default.ProductPriceRule.useSoftReference=false
entitycache.entity.default.ProductPriceRule.expireTime=0
entitycache.entity.default.ProductPriceRule.maxSize=0

product.content.rendered.useSoftReference=false
product.content.rendered.expireTime=0
product.content.rendered.maxSize=0


-----Original Message-----
From: Jacques Le Roux [mailto:jacques.le.roux@les7arts.com] 
Sent: Friday, January 25, 2013 3:51 AM
To: user@ofbiz.apache.org
Subject: Re: Cache Clearing

I never noticed that, a good way to share would be to check on trunk demo

Jacques

From: "Len Shein" <ls...@salmonllc.com>
> I have all the cache.properties set to never expire (commented out),
however
> it seems after I have built up cache at some point the cache is cleared.
I
> have noticed it consistently clears the next day (about a 10 hour window)
> even if there are no users on the site. 
> 
> 
> 
> Does anyone have any experience with the cache and what are the causes for
> it to be cleared?
> 
> 
> 
> 
> 
> 
> 
> Thank You
> 
> 
> 
> Len Shein
> 
> 
> 
> lshein@salmonllc.com
> 
> lshein@verizon.net
> 
> 
> 
> 516.742.7888 ext.225
> 
> 732.333.4303
> 
> 
> 
>


Re: Cache Clearing

Posted by Jacques Le Roux <ja...@les7arts.com>.
I never noticed that, a good way to share would be to check on trunk demo

Jacques

From: "Len Shein" <ls...@salmonllc.com>
> I have all the cache.properties set to never expire (commented out), however
> it seems after I have built up cache at some point the cache is cleared.  I
> have noticed it consistently clears the next day (about a 10 hour window)
> even if there are no users on the site. 
> 
> 
> 
> Does anyone have any experience with the cache and what are the causes for
> it to be cleared?
> 
> 
> 
> 
> 
> 
> 
> Thank You
> 
> 
> 
> Len Shein
> 
> 
> 
> lshein@salmonllc.com
> 
> lshein@verizon.net
> 
> 
> 
> 516.742.7888 ext.225
> 
> 732.333.4303
> 
> 
> 
>