scitedotai/scite-zotero-plugin

No caching of results

andrusha opened this issue · 6 comments

On each Zotero startup the scite plugin fetches the tallies for all the papers, this is nice to have most recent numbers, but put quite a bit of strain on the network. It would be nice to have the values cached with the ability to manually trigger refresh.

Hi @andrusha

Thanks for creating this issue -- I've thought about this before but never got around to implementing it.

Let's say that Zotero does cache some of them after the initial load and you close it -- if you open it up a few days later and wanted to do a refresh, right now the plugin only lets you refresh individual rows. How would you want to be able to bulk refresh? Just a button to refresh all tallies? Or grouped selections?

Thanks for the quick response!

I think the answer is yes, and judging by the other plugins, implementing item-processing for selection / all items / collection is pretty straight-forward once you have the method to work on arrays.

Here is an example of this functionality from scihub integration (code a bit convoluted, but you get the gist):
https://github.com/ethanwillis/zotero-scihub/blob/master/chrome/content/overlay.xul#L27-L45
https://github.com/ethanwillis/zotero-scihub/blob/master/chrome/content/scripts/zoteroscihub.js#L47-L70

To me it seems the harder part would be working with the state storage, I wonder if it's possible to attach citation numbers as the field on the item.

Thank you for your work.
May I ask if this plugin API has adopted a CDN suitable for China?
I am sure when I used it today, No scite tallies because of internet connection problems. But it was normal 12 hours ago.

Hi @hbzhou530 -- we do have a CDN and caching, I think there may have been some performance issues on the API over the weekend that should be resolved now. Is this still happening for you? Maybe you can check over the next few days and report back?

@u-ashish Now it works properly. Thanks.