Re: question about modeler

From: Andrus Adamchik (andru..bjectstyle.org)
Date: Wed Jul 26 2006 - 09:32:05 EDT

  • Next message: Gentry, Michael \(Contractor\): "RE: Clear DataContext Cache"

    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



    This archive was generated by hypermail 2.0.0 : Wed Jul 26 2006 - 09:32:26 EDT