Skip to content

Commit

Permalink
Merge pull request #1889 from eclipse-ditto/bugfix/fix-wrong-cache-in…
Browse files Browse the repository at this point in the history
…validation-search-policy

fix wrongly done invalidation of non-existing cached policy entry in search
  • Loading branch information
thjaeckle authored Feb 2, 2024
2 parents 8077e73 + ce54bb3 commit 023f931
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
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 023f931

Please sign in to comment.