-
Notifications
You must be signed in to change notification settings - Fork 3
Description
When utilizing the PutIfAbsent
method with the parameter ForceReturnValue
set to true
, an unexpected behavior occurs when the key doesn't exist. Specifically, the application hangs indefinitely instead of returning the expected result. It's noteworthy that the issue doesn't manifest when ForceReturnValue
is set to false
.
Upon further investigation, it's observed that even though the application appears to hang, subsequent restarts reveal that the value has indeed been added to the cache. However, the application fails to receive this result.
Expected Behavior:
The expected behavior of the PutIfAbsent
method with ForceReturnValue
set to true
is to return the previous value associated with the key, which, in this scenario, should be null
since the key doesn't exist prior to the operation.
Steps to Reproduce:
- Call the
PutIfAbsent
method withForceReturnValue=true
. - Provide a key that doesn't exist in the cache.
- Observe that the application hangs indefinitely instead of returning the expected result.