public class SimpleKeyGenerator
extends java.lang.Object
implements org.springframework.cache.interceptor.KeyGenerator
SimpleKeyGenerator
and SimpleKey
Simple key generator. Returns the parameter itself if a single non-null value
is given, otherwise returns a SimpleKeyGenerator.SimpleKey
of the parameters.
Unlike DefaultKeyGenerator
, no collisions will occur with the keys
generated by this class. The returned SimpleKeyGenerator.SimpleKey
object can be safely
used with a ConcurrentMapCache
,
however, might not be suitable for all Cache
implementations.
SimpleKeyGenerator.SimpleKey
,
DefaultKeyGenerator
,
CachingConfigurer
Modifier and Type | Class and Description |
---|---|
static class |
SimpleKeyGenerator.SimpleKey
A simple key as returned from the
SimpleKeyGenerator . |
Constructor and Description |
---|
SimpleKeyGenerator() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
generate(java.lang.Object target,
java.lang.reflect.Method method,
java.lang.Object... params) |