Closed frostyfan109 closed 5 years ago
Nevermind, this doesn't seem to be happening?
This is actually happening. It loads the knowledge graph from the response but does not cache it successfully.
Edit: I misunderstood Dexie's schema structure. The ampersand means unique index, not primary key. We're trying to store an object that has a duplicate unique index, so it doesn't work. I think the correct method if we want to update an object is Table::update
.
Fixed. Now Cache::write
looks for any unique keys in the object that is being cached, checks the table to see if any other objects have the same unique key value, and if so, updates said object.
According to Dexie's [documentation](https://dexie.org/docs/Table/Table.put()#remarks), Table::put overrides any entries that have the same primary key, so this likely has something to do with it not caching it for some reason.