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.

    @FunctionalInterface
    public static interface Cache.KeyGenerator
    A functional interface to generate a cache key
    • Method Detail

      • apply

        Cache.Key apply​(HttpRequest request,
                        Boolean isAsync,
                        Class<?> responseType)
        A function to generate a cache key
        Parameters:
        request - the current http request
        isAsync - indicates if this request is being executed async
        responseType - the response type (String, JsonNode, etc)
        Returns:
        a key which can be used as a hash for the cache