From 8f6fcbda3cb05faaa7093a16e0365ceb4cdef9e3 Mon Sep 17 00:00:00 2001 From: Costin Leau Date: Mon, 7 Mar 2011 12:59:04 +0000 Subject: [PATCH] + fix missing tag --- spring-framework-reference/src/cache.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-framework-reference/src/cache.xml b/spring-framework-reference/src/cache.xml index 0e35e9ec662..7ea610ed26e 100644 --- a/spring-framework-reference/src/cache.xml +++ b/spring-framework-reference/src/cache.xml @@ -92,6 +92,7 @@ public Book findBook(ISBN isbn) {...}]]> If only one param is given, return that instance. If more the one param is given, return a key computed from the hashes of all parameters. + This approach works well for objects with natural keys as long as the hashCode() reflects that. If that is not the case then for distributed or persistent environments, the strategy needs to be changed as the objects hashCode is not preserved. In fact, depending on the JVM implementation or running conditions, the same hashCode can be reused for different objects, in the same VM instance.