policies: skip cache on debug request
This commit is contained in:
parent
e555bdd42b
commit
52016e0806
|
@ -103,6 +103,7 @@ class PolicyProcess(PROCESS_CLASS):
|
||||||
# Invert result if policy.negate is set
|
# Invert result if policy.negate is set
|
||||||
if self.binding.negate:
|
if self.binding.negate:
|
||||||
policy_result.passing = not policy_result.passing
|
policy_result.passing = not policy_result.passing
|
||||||
|
if not self.request.debug:
|
||||||
key = cache_key(self.binding, self.request)
|
key = cache_key(self.binding, self.request)
|
||||||
cache.set(key, policy_result)
|
cache.set(key, policy_result)
|
||||||
LOGGER.debug(
|
LOGGER.debug(
|
||||||
|
|
Reference in New Issue