@Introspected public class DefaultCacheKeyGenerator extends java.lang.Object implements CacheKeyGenerator
A default implementation of the CacheKeyGenerator
interface that uses the parameters of the method only.
This implementation is appropriate for most common cases but note that collisions can occur for classes that use the same cache and have overlapping signatures as the default implementation does not use the method itself when generating the key
Constructor and Description |
---|
DefaultCacheKeyGenerator() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
generateKey(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata,
java.lang.Object... params)
Generate a key for the given annotated element and parameters.
|
public java.lang.Object generateKey(io.micronaut.core.annotation.AnnotationMetadata annotationMetadata, java.lang.Object... params)
CacheKeyGenerator
generateKey
in interface CacheKeyGenerator
annotationMetadata
- The annotated metadataparams
- The parameters