mcndt / obsidian-toggl-integration

A Toggl integration plugin for the popular knowledge base application Obsidian.
GNU General Public License v3.0
267 stars 19 forks source link

[Feature] Toggl report caching #97

Closed mcndt closed 1 year ago

mcndt commented 1 year ago

Problem: large queries are slow or fail entirely due to Toggl API rate limiting

Solution: cache report results in data structure to accelerate generating reports and prevent requesting the same information from the toggl servers over and over.

Dependency: I should migrate to Toggl API v9 first.

Todo: Finish the work that was started in release 0.8.0 but reverted in release 1.0.0.

marquiswong commented 1 year ago

It would be nice to have some "archive" command which just caches the data permanently and doesn't hit Toggl at all anymore unless explicitly requested. For previous day's data it's rarely going to change, so it is a waste to keep on hitting Toggl. It also risks losing data if something ever happens to Toggl.

mcndt commented 1 year ago

Closing this for now because the v9 API #91 is much faster at generating summary reports, making the complexity of caching unnecessary.

@marquiswong I understand your concern regarding lost data; IMO you should already make your own regular backups of Toggl exports in CSV or PDF format. Not necessarily something that fits in the scope of this plugin.