Closed jgaehring closed 2 years ago
Most of the necessary changes have been made with 35aae84, but I think I still need to fine tune some issues in farmOS.js. Namely, I've noticed that not all entities are getting their lastSync
timestamp set properly, which is causing unnecessary send requests. Also, some taxonomy terms aren't getting created
metadata from the server, and are being given a url
or /taxonomy_term/undefined
, which should be fixed, but is not a blocker for this issue.
I've noticed that not all entities are getting their lastSync timestamp set properly
I think this was just a relic of the failed syncs that were leaving some bad metadata in the database as I was testing. Clearing all site data and running it fresh seems to have resolved this.
In the course of #465, particularly commit 04fd9e8, I used the implementation of
refreshCache
andsyncCache
to try out some new ideas for improving the behavior of FK's syncing logic, as well as its internal architecture. In particular, I tried to isolate thesyncEntity
function from the specific requirements ofsyncCache
so that I might eventually employ this function in thesyncEntities
action in the Vuex store as well. If it is successful there, I may even wish to include this in farmOS.js itself, as part of the special functionality provided when you use the mainfarmOS
constructor that integrates features of both themodel
and theclient
.In terms of behavioral improvements, there are some much needed fixes in
syncEntity
, as well as corresponding improvements in farmOS.js (beta releases 2 and 4), which will ensure that syncing entities in FK will be more exhaustive, with the introduction of thelimit
option. I also want to use the opportunity to make improvements toSyncError
and fully integrate thecacheEntity
andcachingCriteria
functions fromidb/cache.js
.