Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 13756 invoked from network); 25 Jan 2011 10:55:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 25 Jan 2011 10:55:53 -0000 Received: (qmail 79482 invoked by uid 500); 25 Jan 2011 10:55:53 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 79238 invoked by uid 500); 25 Jan 2011 10:55:50 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 79019 invoked by uid 99); 25 Jan 2011 10:55:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jan 2011 10:55:49 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [59.167.240.32] (HELO fish.ish.com.au) (59.167.240.32) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Jan 2011 10:55:43 +0000 Received: from [10.29.62.4] (port=57186 helo=Aris-MacBook-Pro.local) by fish.ish.com.au with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.69) (envelope-from ) id 1PhgYF-0001Dr-0k; Tue, 25 Jan 2011 21:55:20 +1100 Message-ID: <4D3EAC0A.9050208@maniatis.org> Date: Tue, 25 Jan 2011 21:55:06 +1100 From: Aristedes Maniatis User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b3pre Thunderbird/3.1.7 MIME-Version: 1.0 To: user@cayenne.apache.org CC: dev@cayenne.apache.org Subject: Re: Cache limits References: <20110125114235.90124zuybsiq01cs@horde.phosco.info> In-Reply-To: <20110125114235.90124zuybsiq01cs@horde.phosco.info> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 25/01/11 9:42 PM, André Rothe wrote: > Hello, > > currently I try to understand the Cayenne design and implementation. Can you explain, how you limit the number of objects, which are inside the cache? On an application with a huge number of data rows, the most important point is the size of the used memory for the object cache. If you want more sophisticated caching, you might want to look at oscache or other pluggable options for Cayenne. There is a section about that in the manual. > As I have understand, Cayenne tracks the state of the object, so it is only possible to remove transient objects from the cache. Is it possible to remove the data of (e.g. committed) objects and hold only the id to save memory? Yes, you can fetch data using paged queries. In that case the objects (well, most of them) are hollow, meaning that they hold just the id. This is not only good for memory usage, but also much faster across the network especially for ROP. You can't make an object hollow once you already have it in memory, but you can fetch them as hollow in the first place which is usually what you want to do. It is not uncommon to see an order of magnitude improvement in memory usage and performance with a reasonably large query result. I have moved this thread to the correct place: on the user list. Please reply there and drop dev@ from the cc list. Ari -- --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A