You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A batched event / subscribeChangedTables (or something like that) which contains the Table Name and the Changed IDs of that Table. Or maybe this could be added to the syncState
Usecase
I'm building some kind of time tracker, which shows a summary of tracked times to a specific topic, In-order to not load/aggregate all the possible tracked times for that one topic (on each view of the page), I wanted to have a simple aggregated cache based on the tracked time entries..
Current "Solution" (I'm using)
Since both Clients can be offline, the aggregated value can differ. (Both clients add a time to a topic, then they sync and then that aggregated number is wrong on both)
The aggregated value is synced as well as in a not synced table that holds the aggregated value, as of right now I'm reading the synced value and the non synced one and compare those, if its different I need to re-trigger an aggregation. And this happens each time the topic is read/rendered. Which is also not that perfect (havent read both caches and invalidate each time)
Thats why I thought having an event that tells me what changed, I can just listen to that and refresh caches as needed, instead of adding checks per render and with that save up useless CPU cycles 😬
The text was updated successfully, but these errors were encountered:
Feature Request
A batched event / subscribeChangedTables (or something like that) which contains the Table Name and the Changed IDs of that Table. Or maybe this could be added to the syncState
Usecase
I'm building some kind of time tracker, which shows a summary of tracked times to a specific topic, In-order to not load/aggregate all the possible tracked times for that one topic (on each view of the page), I wanted to have a simple aggregated cache based on the tracked time entries..
Current "Solution" (I'm using)
Since both Clients can be offline, the aggregated value can differ. (Both clients add a time to a topic, then they sync and then that aggregated number is wrong on both)
The aggregated value is synced as well as in a not synced table that holds the aggregated value, as of right now I'm reading the synced value and the non synced one and compare those, if its different I need to re-trigger an aggregation. And this happens each time the topic is read/rendered. Which is also not that perfect (havent read both caches and invalidate each time)
Thats why I thought having an event that tells me what changed, I can just listen to that and refresh caches as needed, instead of adding checks per render and with that save up useless CPU cycles 😬
The text was updated successfully, but these errors were encountered: