Package kong.unirest.core
Interface Cache.KeyGenerator
- Enclosing interface:
Cache
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface to generate a cache key
-
Method Summary
Modifier and TypeMethodDescriptionapply
(HttpRequest request, Boolean isAsync, Class<?> responseType) A function to generate a cache key
-
Method Details
-
apply
A function to generate a cache key- Parameters:
request
- the current http requestisAsync
- indicates if this request is being executed asyncresponseType
- the response type (String, JsonNode, etc)- Returns:
- a key which can be used as a hash for the cache
-