Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 35047 invoked from network); 4 Sep 2008 20:49:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Sep 2008 20:49:12 -0000 Received: (qmail 87583 invoked by uid 500); 4 Sep 2008 20:49:10 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 86913 invoked by uid 500); 4 Sep 2008 20:49:08 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 86902 invoked by uid 99); 4 Sep 2008 20:49:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Sep 2008 13:49:08 -0700 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of clinton.begin@gmail.com designates 64.233.166.178 as permitted sender) Received: from [64.233.166.178] (HELO py-out-1112.google.com) (64.233.166.178) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Sep 2008 20:48:07 +0000 Received: by py-out-1112.google.com with SMTP id a73so95609pye.21 for ; Thu, 04 Sep 2008 13:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=gkSGIalqaerunjFePg1Dz8IYtORJV8E3M+S1cnIIJKk=; b=oPU8NHMxIuYnX7VHVw4DnIGTQ/CJTJfnLa8FBZ4nxfRo3sK4I9rKYqn4WU2WC/qjiW XWnTE9fD6jVSTAKxIf0Eej0fYNL9g3RaPQ8x3376MfjmHoFpVVr2C+GSiNm13dORg1TI xENjV3rzKwENi2rf7DEbJAA/uUzj+P21E2klo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=B+Shmr3xSswz0ZLfIRy8Btt0NnVC2VxeNyIngC6gv5NPqUEiyQgbHAR3apB/xQko+9 qjOw4AGEh+Fa6hMQizUm+t4uGr+k0YgnpcNud2js3DTrdfrAfkY5+qaB08q8bBis1J79 ATao1KL4St//m/3/53GUE0slyn7rnTqbDA9t0= Received: by 10.114.134.20 with SMTP id h20mr9407699wad.91.1220561301010; Thu, 04 Sep 2008 13:48:21 -0700 (PDT) Received: by 10.114.135.14 with HTTP; Thu, 4 Sep 2008 13:48:20 -0700 (PDT) Message-ID: <16178eb10809041348n3a073b4fmb3a07d6bb70f282f@mail.gmail.com> Date: Thu, 4 Sep 2008 14:48:20 -0600 From: "Clinton Begin" To: user-java@ibatis.apache.org Subject: Re: using java SortedSet instead of List for the resultMap In-Reply-To: <19319593.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_49410_28325537.1220561301011" References: <19310126.post@talk.nabble.com> <16178eb10809040748l4e8a2b46t5883e0026357c9a6@mail.gmail.com> <19313314.post@talk.nabble.com> <16178eb10809040913i16a05a2bn54d8fee5cb389a01@mail.gmail.com> <19319593.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_49410_28325537.1220561301011 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Don't set the cache to 1, that would be silly. :-) Don't try to be too clever about it. Just configure it simply and let it work the way it works. If you're trying to achieve some ultimate level of performance, then your best bet is to cache outside of your persistence framework into something like memcached or Coherence using your own business rules. And of course caching at the web tier is the biggest bang for your buck anyway. Clinton On Thu, Sep 4, 2008 at 2:45 PM, zeppelin wrote: > > ' In a nutshell, cache lists, don't cache individual objects...' - a > little > confusing > > If I'm ONLY caching a list, the size I need is only 1. Right ? > > > > > > If I decide to cache another object (POJO) and use the same cacheModel id > (lruCache), I would need to change the size ( size="2" ) and the LRU > algorithm will take care of expelling either of the two objects (POJO and > list). Is this correct ? > > Sorry if all this has been answered before. I read the pdf a while back and > still have some questions on caching. > -- > View this message in context: > http://www.nabble.com/using-java-SortedSet-instead-of-List-for-the-resultMap-tp19310126p19319593.html > Sent from the iBATIS - User - Java mailing list archive at Nabble.com. > > ------=_Part_49410_28325537.1220561301011 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Don't set the cache to 1, that would be silly. :-)

Don't try to be too clever about it.  Just configure it simply and let it work the way it works.

If you're trying to achieve some ultimate level of performance, then your best bet is to cache outside of your persistence framework into something like memcached or Coherence using your own business rules.  And of course caching at the web tier is the biggest bang for your buck anyway.

Clinton

On Thu, Sep 4, 2008 at 2:45 PM, zeppelin <shantanu.u@gmail.com> wrote:

' In a nutshell, cache lists, don't cache individual objects...' -  a little
confusing

If I'm ONLY caching a list, the size I need is only 1. Right ?
       <cacheModel id="lruCache" type="LRU">
               <flushInterval hours="24"/>
               <property name="size" value="1" />
       </cacheModel>

If I decide to cache another object (POJO) and use the same cacheModel id
(lruCache), I would need to change the size ( size="2" ) and the LRU
algorithm will take care of expelling either of the two objects (POJO and
list). Is this correct ?

Sorry if all this has been answered before. I read the pdf a while back and
still have some questions on caching.
--
View this message in context: http://www.nabble.com/using-java-SortedSet-instead-of-List-for-the-resultMap-tp19310126p19319593.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


------=_Part_49410_28325537.1220561301011--