From c7867c4c0dbf7d267a92524adfb9d791bc886d65 Mon Sep 17 00:00:00 2001 From: Alex Szczuczko Date: Thu, 23 Jul 2020 08:11:15 -0600 Subject: [PATCH] KEYCLOAK-14875 Enable path cache when maxAge is -1, or greater than 0 --- .../java/org/keycloak/adapters/authorization/PathCache.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authorization/PathCache.java b/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authorization/PathCache.java index 62bfd39636..a20d4a6d4b 100644 --- a/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authorization/PathCache.java +++ b/adapters/oidc/adapter-core/src/main/java/org/keycloak/adapters/authorization/PathCache.java @@ -57,7 +57,7 @@ public class PathCache { } }; this.maxAge = maxAge; - this.enabled = maxAge > 0; + this.enabled = ! (maxAge < -1 || (maxAge > -1 && maxAge <= 0)); } public void put(String uri, PathConfig newValue) {