I discovered an issue where .get API method returns a null (non-existent) value from cache upon timeout, because the server value is large and takes some time to download. In this case it MUST wait for the server value to arrive, and NOT use the value from cache. After some research, I discovered this is caused by a recent commit in web-api.js:1588 - val is now an object containing both value and context, but in line 1595 it still uses val instead of value to check for existence; so .get will return null as the current value. This is a major problem for live data proxies that use a default value if the target path does not exist, because it will overwrite the value after this faulty response!
Note this only applies to AceBaseClient's using a local cache database, when fetching a value from the server that takes more than a second to load (1000ms is the timeout for delivering the cached value)
I discovered an issue where
.get
API method returns anull
(non-existent) value from cache upon timeout, because the server value is large and takes some time to download. In this case it MUST wait for the server value to arrive, and NOT use the value from cache. After some research, I discovered this is caused by a recent commit in web-api.js:1588 -val
is now an object containing bothvalue
andcontext
, but in line 1595 it still usesval
instead ofvalue
to check for existence; so.get
will returnnull
as the current value. This is a major problem for live data proxies that use a default value if the target path does not exist, because it will overwrite the value after this faulty response!Note this only applies to
AceBaseClient
's using a local cache database, when fetching a value from the server that takes more than a second to load (1000ms is the timeout for delivering the cached value)