ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <larry.mead...@gmail.com>
Subject Re: caching and obect refs
Date Fri, 11 Jul 2008 13:18:35 GMT
Make it read-only and serializable.

Larry


On Fri, Jul 11, 2008 at 12:40 AM, Darren Davison
<darren@davisononline.org> wrote:
> just out of interest, how do people handle the sharing of object refs
> from an ibatis cache?
>
> If I cache a reference to a Product instance and a second user obtains
> that reference from the cache, the cache will effectively be tainted by
> any transient modification that user makes to the instance. i.e. even if
> the user would have no rights to persist those changes.
>
> What do others do - not cache anything other than immutable classes?
> manage caches on a per user basis?  Something else altogether?
>
> Cheers,
>
> --
> Darren Davison
> Public Key: 0xE855B3EA
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFIdwBhVgOfSOhVs+oRAtiqAJkBRXc66yDXWQQU1cZ5EE7Q5ucBowCeOT+C
> EXyaf0KFoByfTwwVuoRtrUs=
> =pfE5
> -----END PGP SIGNATURE-----
>
>

Mime
View raw message