Package io.quarkus.cache
Interface CacheKeyGenerator
- All Known Implementing Classes:
UndefinedCacheKeyGenerator
public interface CacheKeyGenerator
Implement this interface to generate a cache key based on the cached method, its parameters or any data available from within
the generator.
The class must either represent a CDI bean or declare a public no-args constructor. In case of CDI, there must be exactly one
bean that has the class in its set of bean types, otherwise the build fails. The context associated with the scope
of the bean must be active when the generate(Method, Object...)
method is invoked. If the scope is Dependent
then the bean instance is destroyed when the generate(Method, Object...)
method completes.
-
Method Summary
-
Method Details
-
generate
Generates a cache key.- Parameters:
method
- the cached methodmethodParams
- the method parameters- Returns:
- cache key
-