You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Vic Cekvenich <vi...@phoneZoo.com> on 2008/05/09 02:30:29 UTC
ibatis cache miss duplicate request
Hello again list :-).
When I have a cache miss on a select that runs long; and another
request comes to ibatis, does it run the query both times?
...or if there are 10 requests that come on a cache miss.
tia,
.V
Re: ibatis cache miss duplicate request
Posted by Clinton Begin <cl...@gmail.com>.
The cache only blocks when it's updating from the first result. It
won't stop the other requests from executing. So it's the latter.
That should be very unlikely, and if it's not, maybe consider seeding
the cache (if the requests are that predictable) or use a second level
caching solution.
Incidentally, iBATIS 3 will defer the load on the subsequent requests
(i.e. only load them once) if they're executed within the same
session. The challenge with doing this globally is the potential for
cache deadlocks.
Cheers,
Clinton
On Thu, May 8, 2008 at 6:30 PM, Vic Cekvenich <vi...@phonezoo.com> wrote:
> Hello again list :-).
>
> When I have a cache miss on a select that runs long; and another request
> comes to ibatis, does it run the query both times?
> ...or if there are 10 requests that come on a cache miss.
>
>
> tia,
> .V
>
>