mirror of
https://github.com/appy-one/acebase-client.git
synced 2026-05-24 22:01:18 -06:00
[GH-ISSUE #15] Using missing cache value instead of server value #13
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/acebase-client#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @appy-one on GitHub (Nov 11, 2021).
Original GitHub issue: https://github.com/appy-one/acebase-client/issues/15
Originally assigned to: @appy-one on GitHub.
I discovered an issue where
.getAPI 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 -valis now an object containing bothvalueandcontext, but in line 1595 it still usesvalinstead ofvalueto check for existence; so.getwill returnnullas 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)@appy-one commented on GitHub (Nov 11, 2021):
Fix published with
acebase-client1.8.2