Skip to content

Commit

Permalink
🐛 Prevents stale cache issues in GraphQL AppDefinitionLoadingCache
Browse files Browse the repository at this point in the history
  • Loading branch information
ujibang committed Feb 6, 2025
1 parent 2089fac commit 089e13c
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@ public static GraphQLApp getLoading(String appURI) throws GraphQLAppDefNotFoundE
if (_app != null && _app.isPresent()){
return _app.get();
} else {
// Remove key if null was cached (previous request missed it, but it may exist now)
if (_app != null && _app.isEmpty()) {
CACHE.remove(appURI);
}

try {
_app = CACHE.getLoading(appURI);
} catch (Exception e) {
Expand Down

0 comments on commit 089e13c

Please sign in to comment.