dhruvmanila / browser-bookmarks.nvim

A Neovim plugin to open your browser bookmarks right from the editor!
MIT License
207 stars 14 forks source link

Data is not updated in real-time when using Raindrop backend #42

Open pmatulis opened 5 hours ago

pmatulis commented 5 hours ago

Using the Raindrop backend results in a stale cache. My workaround is to refresh it by restarting my Neovim instance and invoking the plugin (for me: Telescope bookmarks).

Is this normal? If so, does it not make sense to periodically update the local cache?

dhruvmanila commented 3 hours ago

Is this normal? If so, does it not make sense to periodically update the local cache?

Yes, this is normal. The cache is stored per Neovim session. The following clears that cache after which an invocation of Telescope bookmarks should trigger another job to collect the bookmarks:

require('browser_bookmarks.browsers.raindrop').clear_cache()

I'm not sure if it makes sense to update the cache periodically as I don't use Raindrop. It's difficult to assess how often should this be and I'm not sure how common it is to update the bookmarks during a single Neovim session.