On 6/6/07, Meindert <[EMAIL PROTECTED]> wrote:
Is it by design that the object returned from the cache has the same object
reference as the on in the cache?

Yes, it is. This is intended to be a performance enhancing tweak for
the brave, but in your case it is a misconfiguration.

In your cache definition, you have readonly="true", but are not
modifying the results. You are a very bad boy. Don't do that. :-)

If you set serializable="true" and readonly="false" then the object is
copied before being returned from the cache - assuming that the cached
objects are serializable - if they are not, KABOOM!

Note: If you set serializable="false" and readonly="false", you will
lose a lot of caching benefits, because results will only be cached
for the current iBATIS 'session', which is in 99.999% of cases, not
what you want. Don't do that either. :-)

Larry

Reply via email to