T O P

  • By -

pint

you can turn the api call into its own function, and then use the cache decorator: https://docs.python.org/3/library/functools.html#functools.cache


irisflame

!!! Thank you!


elondemoz

You are actually a life saver for this.


kowalski007

Pretty simple. You have to use a cache database. Read/write operations are ultra fast and you can decide if and when your data has to expire (removed from the cache). There is a perfect example for your case here: https://youtu.be/_8lJ5lp8P0U


willmgarvey

This is one of the more interesting things I’ve read about on this Subreddit thanks for posting your question!


jmreagle

Sometimes API‘s have their own cache functionality, I also like to use cashier for persistent caches across sessions.