You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cayenne.apache.org by Andrus Adamchik <an...@objectstyle.org> on 2009/05/07 15:02:32 UTC

Re: [CONF] Apache Cayenne Documentation: Caching and Fresh Data (page edited)

Hi Ari,

thanks for cleaning this up.

> not only eliminates the time required to fetch data from the  
> database, but also the time required to instantiate that data into  
> Java objects.

Here is one note - I think the second part of this sentence is  
redundant. Merging (or non-merging) of the fetched data into an  
existing object as a separate concern is no longer present in Cayenne,  
as 'setRefreshingObjects' has been deprecated, and any executed non- 
cached query results in object refreshing.

Andrus



On May 7, 2009, at 8:46 AM, confluence@apache.org wrote:
> Page Edited : CAYDOC : Caching and Fresh Data
> Caching and Fresh Data has been edited by Ari Maniatis (May 07, 2009).
>
> Change summary:
>
> small clarifications
>
>
> (View changes)
>
> Content:
> Caching and Fresh Data
> Caching is used by Cayenne to reduce database access and improve  
> performance of your application. Sometimes caching automatically  
> happens behind the scenes, and in other places the user must declare  
> an intent to cache data. Configuring caching parameters beyond the  
> provided reasonable defaults is an art of balancing performance with  
> the need to see the fresh data.
>
> The are two types of cache in Cayenne:
>
> Query Cache
> This cache retains the results of a query in memory. When this cache  
> is utilised by the second and successive queries, no further SELECT  
> is performed on the database to determine which records match your  
> query parameters.
>
> Object Cache
> This cache stores the actual objects and not only eliminates the  
> time required to fetch data from the database, but also the time  
> required to instantiate that data into Java objects.
>
>
> As of Cayenne 3.0, two types of caches (individual object and query  
> results) are separate from each other. Query cache can be extended  
> and managed, while individual object cache has fewer configuration  
> options - just max size and synchronization strategy. There are  
> plans to reconcile both caches in the following releases.
> Sections
> 	• Individual object caching
> 	• Query result caching
>
>
> Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07,  
> 2006) - Bug/feature request
>
> Unsubscribe or edit your notifications preferences


Re: [CONF] Apache Cayenne Documentation: Caching and Fresh Data (page edited)

Posted by Aristedes Maniatis <ar...@ish.com.au>.
On 07/05/2009, at 11:02 PM, Andrus Adamchik wrote:

>> not only eliminates the time required to fetch data from the  
>> database, but also the time required to instantiate that data into  
>> Java objects.
>
> Here is one note - I think the second part of this sentence is  
> redundant. Merging (or non-merging) of the fetched data into an  
> existing object as a separate concern is no longer present in  
> Cayenne, as 'setRefreshingObjects' has been deprecated, and any  
> executed non-cached query results in object refreshing.

My point was only that the time saving is more than the raw db speed,  
but also the cost of creating java objects from the raw data coming  
from the JDB adapter. But you answered the question I just put in  
another email.

Ari



-------------------------->
ish
http://www.ish.com.au
Level 1, 30 Wilson Street Newtown 2042 Australia
phone +61 2 9550 5001   fax +61 2 9550 4001
GPG fingerprint CBFB 84B4 738D 4E87 5E5C  5EFA EF6A 7D2E 3E49 102A