ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Benedict <paul4chris...@yahoo.com>
Subject RE: Cacheing rowless queries?
Date Fri, 11 Nov 2005 01:04:24 GMT
No. A non-result means the resultMap is not yet attempted to be populated; an empty result
means
the resultMap was used in a query with no rows returned. The difference between a NULL and
0,
effectively. I like your idea anyhow.

--- "Voorhoeve, Niels {PBG}" <niels.voorhoeve@pepsi.com> wrote:

> Well, I guess the key would be the same...based on the query and the
> parameters.  If it returns no rows/objects then put a regular old
> java.lang.Object in the cache.  If it had not been attempted yet or returned
> rows then the key wouldn't be there.  Is that what you meant by non-result
> vs. empty result?
> 
> -----Original Message-----
> From: Paul Benedict [mailto:paul4christ79@yahoo.com] 
> Sent: Thursday, November 10, 2005 6:48 PM
> To: user-java@ibatis.apache.org
> Subject: Re: Cacheing rowless queries?
> 
> Niels,
> 
> That's like a really awesome idea. What kind of marker do you propose to
> determine a non-result
> from an empty result? I would find this super valuable. While you're at it,
> I don't think caching
> works unless you pass in parameters; I have MANY parameterless queries and I
> haven't been able to
> see them get cached yet (stay tuned).
> 
> --- "Voorhoeve, Niels {PBG}" <niels.voorhoeve@pepsi.com> wrote:
> 
> > Hi,
> > 
> > How difficult / desirable would it be to code a feature in the cacheing
> > mechanism to keep track of queries that do not return any objects?  In our
> > case, we end up hitting the database many times for queries that don't
> > return objects.  It would be nice to check a cache of non-results to avoid
> > this extra trip to the db.  I have implemented a work-around to accomplish
> > this in our base dao, but it's not very convenient to use.  
> > 
> > Niels
> > 
> 
> 
> 
> 		
> __________________________________ 
> Yahoo! FareChase: Search multiple travel sites in one click.
> http://farechase.yahoo.com
> 



		
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com

Mime
View raw message