Skip to content

Commit

Permalink
fix wrongly done invalidation of non-existing cached policy entry in …
Browse files Browse the repository at this point in the history
…search

* that could cause that e.g. a deleted imported policy which is re-added did not cause a reindexing of affected things
  • Loading branch information
thjaeckle committed Feb 2, 2024
1 parent 8077e73 commit ce54bb3
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -342,7 +342,7 @@ private Source<Entry<Pair<Policy, Set<PolicyTag>>>, NotUsed> readCachedEnforcer(
.ifPresent(causingPolicyTag -> {
final boolean invalidated = policyEnforcerCache.invalidateConditionally(
new PolicyIdResolvingImports(causingPolicyTag.getEntityId(), false),
entry -> entry.exists() &&
entry -> !entry.exists() ||
entry.getRevision() < causingPolicyTag.getRevision()
);
log.debug("Causing policy tag was invalidated conditionally: <{}>",
Expand Down

0 comments on commit ce54bb3

Please sign in to comment.