Skip to content

Commit

Permalink
Disabled cache (finos#843)
Browse files Browse the repository at this point in the history
Co-authored-by: Simon Cockx <[email protected]>
  • Loading branch information
hugohills-regnosys and SimonCockx authored Sep 18, 2024
1 parent 02309e3 commit 14c7033
Showing 1 changed file with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,20 @@ public RequestScopedCache(int initialCapacity) {

@SuppressWarnings("unchecked")
public <T> T get(Object key, Provider<T> provider) {
Object v = values.get(key);
if (v == NULL) {
return null;
}
if (v != null) {
return (T)v;
}
// Object v = values.get(key);
// if (v == NULL) {
// return null;
// }
// if (v != null) {
// return (T)v;
// }

T computed = provider.get();
if (computed == null) {
values.put(key, NULL);
} else {
values.put(key, computed);
}
// if (computed == null) {
// values.put(key, NULL);
// } else {
// values.put(key, computed);
// }
return computed;
}

Expand Down

0 comments on commit 14c7033

Please sign in to comment.