ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Voorhoeve, Niels {PBG}" <niels.voorho...@pepsi.com>
Subject RE: Cacheing rowless queries?
Date Fri, 11 Nov 2005 00:05:07 GMT
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?


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.

View raw message