policies: skip cache on debug request
This commit is contained in:
parent
e555bdd42b
commit
52016e0806
|
@ -103,8 +103,9 @@ 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
|
||||||
key = cache_key(self.binding, self.request)
|
if not self.request.debug:
|
||||||
cache.set(key, policy_result)
|
key = cache_key(self.binding, self.request)
|
||||||
|
cache.set(key, policy_result)
|
||||||
LOGGER.debug(
|
LOGGER.debug(
|
||||||
"P_ENG(proc): finished and cached ",
|
"P_ENG(proc): finished and cached ",
|
||||||
policy=self.binding.policy,
|
policy=self.binding.policy,
|
||||||
|
|
Reference in New Issue