Skip to content

Commit

Permalink
fix: use concurrent hashmap instead of synchroniztion for recordcache
Browse files Browse the repository at this point in the history
Signed-off-by: Lev Povolotsky <[email protected]>
  • Loading branch information
povolev15 committed Jan 23, 2024
1 parent 1dd0267 commit 654c1fb
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,11 @@ public void reset() {
* @param value The value
*/
protected final void markRead(@NonNull K key, @Nullable V value) {
if (value == null) readCache.put(key, (V) marker);
else readCache.put(key, value);
if (value == null) {
readCache.put(key, (V) marker);
} else {
readCache.put(key, value);
}
}

/**
Expand Down

0 comments on commit 654c1fb

Please sign in to comment.