pybliometrics icon indicating copy to clipboard operation
pybliometrics copied to clipboard

Add support for database cache

Open carlsonp opened this issue 6 years ago • 2 comments
trafficstars

Apologies if this is perhaps out-of-scope of this project but have you considered adding an option to set a database for caching the files? Perhaps something like MongoDB? This would provide a number of benefits. The biggest is probably an easier ability to share the cached data since there is often a lot of data to download and if you're collaborating with others, they could all use and contribute to this shared cache.

carlsonp avatar Aug 16 '19 15:08 carlsonp

Sharing cached data is indeed a huge benefit. My colleagues and me currently use:

a) a NextCloud (syncthing might be useful as well; config.ini ignored in any case), b) as small queries as feasible (e.g. "af-id(%s) AND PUBYEAR = %d" % (i, y) in a nested loop that goes through i & y, rather than PUBYEAR > year_start or similar), and c) randomization of the i & y lists.

Hope this already helps, while no DB-based cache is available :-)

katrinleinweber avatar Aug 19 '19 10:08 katrinleinweber

Hi both of you! I've been reluctant to form an opinion on this question. After some consideration, I think it's better to go without database cache. pybliometrics is used by many w/o programming experience and it's for them that I want to keep it lightweight. That means, I prefer to continue with the current caching system.

Having said that, I'd warmly welcome some instructions in the documentation (maybe under Tips) for how you put the cached files in an SQL database!

Michael-E-Rose avatar Sep 09 '19 14:09 Michael-E-Rose

Apparently won't be happening.

Michael-E-Rose avatar Oct 20 '23 07:10 Michael-E-Rose