You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-cs@ibatis.apache.org by Jeremy Gray <jg...@siberra.com> on 2005/06/03 03:18:07 UTC

cacheModel interaction with non-SimpleType parameter objects without parameter maps

During some testing of cache models today I noticed that the cache was
returning incorrect results.

 

Upon breaking out the debugger (against a locally-built copy of a fairly
recent SVN version) I was able to determine that non-SimpleType
parameter objects without parameter maps seem to be provoking incorrect
cacheKey equality matches, causing the wrong result to be returned from
the cache. 

 

Between the code (and its apparent behaviour in the face of
non-SimpleType parameter objects) and the documentation (with respect to
parameter maps and dynamic sql) it would seem that caching might only
work with simple types and might not work at all in the context of
dynamic sql. Before I dig much farther into the code tomorrow might
someone be able to confirm/deny the above statements?

 

Thanks in advance,

 

Jeremy Gray


Re: cacheModel interaction with non-SimpleType parameter objects without parameter maps

Posted by Bob Hanson <mn...@gmail.com>.
I'd be interested in a response as well.

My applications runs pretty slow so I want to dive into the iBatis caching next.

Related question: Where is the best cache documentation?

On 6/2/05, Jeremy Gray <jg...@siberra.com> wrote:
>  
>  
> 
> During some testing of cache models today I noticed that the cache was
> returning incorrect results. 
> 
>   
> 
> Upon breaking out the debugger (against a locally-built copy of a fairly
> recent SVN version) I was able to determine that non-SimpleType parameter
> objects without parameter maps seem to be provoking incorrect cacheKey
> equality matches, causing the wrong result to be returned from the cache. 
> 
>   
> 
> Between the code (and its apparent behaviour in the face of non-SimpleType
> parameter objects) and the documentation (with respect to parameter maps and
> dynamic sql) it would seem that caching might only work with simple types
> and might not work at all in the context of dynamic sql. Before I dig much
> farther into the code tomorrow might someone be able to confirm/deny the
> above statements? 
> 
>   
> 
> Thanks in advance, 
> 
>   
> 
> Jeremy Gray

Re: cacheModel interaction with non-SimpleType parameter objects without parameter maps

Posted by Ron Grabowski <ro...@yahoo.com>.
What does your <cacheModels> node look like? Could you also post one or
two sample <statements> that you think are causing problems?

Thanks,
Ron

--- Jeremy Gray <jg...@siberra.com> wrote:

> During some testing of cache models today I noticed that the cache
> was
> returning incorrect results.
> 
>  
> 
> Upon breaking out the debugger (against a locally-built copy of a
> fairly
> recent SVN version) I was able to determine that non-SimpleType
> parameter objects without parameter maps seem to be provoking
> incorrect
> cacheKey equality matches, causing the wrong result to be returned
> from
> the cache. 
> 
>  
> 
> Between the code (and its apparent behaviour in the face of
> non-SimpleType parameter objects) and the documentation (with respect
> to
> parameter maps and dynamic sql) it would seem that caching might only
> work with simple types and might not work at all in the context of
> dynamic sql. Before I dig much farther into the code tomorrow might
> someone be able to confirm/deny the above statements?
> 
>  
> 
> Thanks in advance,
> 
>  
> 
> Jeremy Gray
> 
>