diff --git a/src/main/java/com/adobe/cq/commerce/graphql/client/impl/GraphqlClientImpl.java b/src/main/java/com/adobe/cq/commerce/graphql/client/impl/GraphqlClientImpl.java index 2a73098..2814041 100644 --- a/src/main/java/com/adobe/cq/commerce/graphql/client/impl/GraphqlClientImpl.java +++ b/src/main/java/com/adobe/cq/commerce/graphql/client/impl/GraphqlClientImpl.java @@ -282,11 +282,14 @@ public GraphqlResponse execute(GraphqlRequest request, Type typeOfT if (cache != null) { CacheKey key = new CacheKey(request, options); try { + LOGGER.debug("Cache HIT : Returning response from cache for key {}", key); return (GraphqlResponse) cache.get(key, () -> executeImpl(request, typeOfT, typeofU, options)); } catch (ExecutionException e) { + LOGGER.error("Failed to return response from Cache", e); return null; } } + LOGGER.debug("Cache MISS : Executing GraphQL call with Commerce"); return executeImpl(request, typeOfT, typeofU, options); }