Scrython icon indicating copy to clipboard operation
Scrython copied to clipboard

Cache functionality?

Open pbaranay opened this issue 6 years ago • 5 comments

Would you accept a pull request that adds caching functionality to Scrython? Supporting caching in the library itself would be a big benefit, rather than each other developer needing to implement their own caching scheme.

If you're excited by this, I'm willing to look into adding this feature, and I'd love to discuss implementation details in more depth. My main thoughts are currently the following:

  • I'd like to use diskcache for this, specifically the FanoutCache.memoize decorator. Given how many objects Scryfall has, I'd rather use a disk-based cache (with a long expiration time) than a memory-based one.
  • The caching functionality should probably be disabled by default.

Thanks for writing the library!

pbaranay avatar Nov 04 '18 07:11 pbaranay

I'd have to take a look at this in greater detail later, but I'd be okay with seeing this implemented.

Since a major refactor on Scrython was finished, there's a new Foundation class that was added that all other classes inherit from. New functionality like that would be easiest to implement in that class. Make a pull to develop and I'd be happy to take a look at it.

NandaScott avatar Nov 06 '18 00:11 NandaScott

Did anything ever come of this?

jkaupanger avatar Apr 23 '20 17:04 jkaupanger

Is this still planned because I would like to use it?

ghost avatar Nov 24 '20 01:11 ghost

I currently don't have the time to dedicate to updating this package with that kind of functionality. I also never planned to add this, it was suggested by someone else. I only have time for small patches. I welcome anyone who would like to fork this repo and submit a PR to add it.

NandaScott avatar Nov 24 '20 02:11 NandaScott

I might see about giving this a shot, will submit a PR if/when I'm successful.

Investigamer avatar Aug 03 '22 02:08 Investigamer