Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 71278 invoked from network); 3 Mar 2006 19:01:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Mar 2006 19:01:41 -0000 Received: (qmail 39899 invoked by uid 500); 3 Mar 2006 19:02:27 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 39878 invoked by uid 500); 3 Mar 2006 19:02:26 -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 39856 invoked by uid 99); 3 Mar 2006 19:02:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2006 11:02:26 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [216.239.124.38] (HELO cn-sfo1-mail-relay1.cnet.cnwk) (216.239.124.38) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2006 11:02:25 -0800 Received: from [10.16.180.66] (rjf.cnet.cnwk [10.16.180.66]) by cn-sfo1-mail-relay1.cnet.cnwk (8.12.10/8.12.10) with ESMTP id k23J24Mv017723 for ; Fri, 3 Mar 2006 11:02:04 -0800 (PST) X-Spam-Filter: check_local@cn-sfo1-mail-relay1.cnet.cnwk by digitalanswers.org Message-ID: <440892AA.4010206@cnet.com> Date: Fri, 03 Mar 2006 11:02:02 -0800 From: Reuben Firmin User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051013) X-Accept-Language: en-us, en MIME-Version: 1.0 To: user-java@ibatis.apache.org Subject: Re: Flushing caches References: <006b01c63ef0$91b1ce60$f702a8c0@ad.int.compsciresources.com> <44088C5A.4060302@pandora.be> <44088EF0.4030507@cnet.com> <4408916A.1070101@pandora.be> In-Reply-To: <4408916A.1070101@pandora.be> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Clinton sez, in the message referenced in that bug: "This is where custom, or domain specific, caching comes into play." Apologies if this is in TFM, but is there a way to get Ibatis to use your own cache implementation? Or is this something that you'd have to write at your DAO level? Sven Boden wrote: > > No that's not possible, and probably will never be. There's a JIRA > open for it http://issues.apache.org/jira/browse/IBATIS-222 which I > would like to close as "won't fix" ;-). > > The problem is that iBATIS has no concept of object identity. If you > look at the caching code, caching is on the "level of the > query/ResultSet", if you have iBATIS e.g. return 2 lists of objects, > it may be well be that what for you is 1 and the same object may be > cached twice (once in every list). Object identity is a concept that > doesn't mix with Sql Mapping. > > Regards, > Sven > > Reuben Firmin wrote: > >> I've been wondering about a related question -- is there any way to >> flush a cache for only one particular object? >> >> I'd like to be able to say "I've only modified this Foo bean, so >> flush it, but keep the other Foo beans that are in the cache". Are >> there problems associated with this that I'm missing? >> >> >> Sven Boden wrote: >> >>> >>> Following should do the trick: >>> >>> sqlMapClient.flushDataCache(); >>> or >>> sqlMapClient.flushDataCache("cache id"); >>> >>> Look in the com.ibatis.sqlmap.client.SqlMapClient interface. >>> >>> Regards, >>> Sven >>> >>> Joe Wolf wrote: >>> >>>> Is there any way to programmatically flush a cache? I'm getting >>>> ready to head down the road where I'll just call some bogus >>>> statement in my SQL map that's in my cache's flushOnExecute list. >>>> I was wondering if there was a more straightforward way. Thanks. >>>> >>>> -Joe CompSci Resources, LLC >>>> >>>> >> >>