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}" <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
> Sent: Thursday, November 10, 2005 6:48 PM
> To: [email protected]
> 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}" <[EMAIL PROTECTED]> 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