In what follows we update a retrieved object. We then retrieve it again, but the object we get is the previous one, not the updated one. When we start a new session we get the correct value. This bug was discovered in SYNR-1161.
, I see that getUserProfile() has the "@memoize" annotation. Is that the reason for the result described above? How doe "@memoize" know when a cached value is stale? Could we simply remove this annotation?
You mentioned you saw a similar phenomenon related to entity annotations. Can you repro' with the Python client and add to this issue? I do not see the "@memoize" annotation associated with annotation related code so it may be a separate issue we need to study.
This was done by design as it is very time consuming for fetching userProfile. You can temporarily invaldiate the cache by passing in refresh=True to the function. E.g.
This is not caching but memoization so does not get invalidated automatically.
getting annotations does not use the same logic, so is likely an unrelated issue.
Hi Bruce and Larsson, the issue I saw was during developing the file view vignettes. After I ran synStore() to create/save a file, synSetAnnotations() fails because the file etag has changed, but wasn't reflected in the file object. The same code is in the file view vignette, but I could not reproduce the problem. I will open a different jira if it occurs again.
I verified that the 'refresh' parameter appears in the documentation. So I guess the resolution is that Bruce needs to "RTFM".