You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cayenne.apache.org by Lothar Krenzien <lk...@web.de> on 2006/07/25 19:54:03 UTC

question about modeler

Hi,

I would like to know what does the option "Max. Number of Objects" in the "Cache Configuration" part of the modeler really means. Is it the number of objects in the cache or the number of instances for each database  object (table/view...) ? What makes we wonder is that I leave the default value (1000) configured but in a profiler it looks like that I have over 100000 objects in the cache. 

What I also saw is that the default value wasn't written to the cayenne.xml file but a different value was. So my question is what happens when no cache size is configured ? Is the default value used or an unlimited cache size ?

Thanks, Lothar
_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000071


Re: question about modeler

Posted by Andrus Adamchik <an...@objectstyle.org>.
On Jul 25, 2006, at 1:54 PM, Lothar Krenzien wrote:

> Hi,
>
> I would like to know what does the option "Max. Number of Objects"  
> in the "Cache Configuration" part of the modeler really means.

This is the number of database row snapshots kept in the cache. They  
are used internally in three cases, preventing a database fetch:

* when objects are searched by PK
* when to-one relationships are resolved
* as a baseline for comparison of a modified object when building an  
update query (this one became redundant in 1.2, and will probably be  
replaced with a different algorithm).


> Is it the number of objects in the cache or the number of instances  
> for each database  object (table/view...) ? What makes we wonder is  
> that I leave the default value (1000)

more accurately this is 10000.

> configured but in a profiler it looks like that I have over 100000  
> objects in the cache.

10000 is the upper limit on the number of entries in  
DataRowStore.snapshots map. Is this the one you are looking at?


> What I also saw is that the default value wasn't written to the  
> cayenne.xml file but a different value was.

True.

> So my question is what happens when no cache size is configured ?  
> Is the default value used or an unlimited cache size ?

Default value should be used.

Andrus