-
-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I am trying to use Etebase's Local Cache to recreate the Etesync 1.0 sync
functionality where the local cache could be updated with only changed items.
My plan is as follows:
At end of day
- Use
item_mgr.cache_save(item)
to save the item to cache. Presumably, I would have to put this in a loop (for item in items:
) to save all items to local storage. - Also store
items.stoken
to local storage.
Come back next day
- Run a
item_mgr.cache_load(cache_blob)
loop to load all items. - Fetch new items with
items = item_mgr.list(FetchOptions().stoken(stoken))
What I do not understand is how to merge the cache and the new/updated items. One possibility is to convert items
into a python dict with uid
as key and do something like
updated_items_dict = cached_items_dict.update(new_items_dict)
Would appreciate any help on how to go about doing this.
Also the python source code contains a function cache_save_with_content
. Is this of any use in this context? I can understand python
code but not rust
Metadata
Metadata
Assignees
Labels
No labels