diff --git a/src/main/java/org/casbin/jcasbin/main/SyncedCachedEnforcer.java b/src/main/java/org/casbin/jcasbin/main/SyncedCachedEnforcer.java index 6de7b6d6..8eeb5c22 100644 --- a/src/main/java/org/casbin/jcasbin/main/SyncedCachedEnforcer.java +++ b/src/main/java/org/casbin/jcasbin/main/SyncedCachedEnforcer.java @@ -121,7 +121,7 @@ public void enableCache(boolean enable) { * @return The result of the enforcement check. */ public boolean enforce(Object... rvals) { - if (enableCache.get()) { + if (!enableCache.get()) { return super.enforce(rvals); }