Closed kefniark closed 7 years ago
Re. the JS implementation, if a value does not exist, it is cached with value undefined
. So when doing a 2nd optional get, it will simply return that undefined
and not hit the server again.
After discussion, I changed a little bit this PR based on the JS Version:
Tested, it seems to properly work on our project
Completely my fault for not being more involved in the beginning.
We fixed the problem in the wrong way. The issue is that when ValueDel
is called we should be instantiating an empty VaultValue
into the cache before null'ing it out. This is what ValueSet
does. The delete logic is required as it throws other events that we need.
ok let's restart another PR from scratch if it's to remove everything
Description
Issue found with Archivist.MGet when using the flag
optional = true
in the current code, MGet crash on the first null element of the result and throw a nullReferenceException.This happen because this element with a null value is not saved in the cache.
How to Test
In the following code, if any of the seasonId in queries doesn't exist in archivist, the MGet callback will return
("NullReferenceException", null)
Comment
responseObject
anyway?