Closed rushkii closed 3 years ago
permanent_cache()
is an internal decorator I added to not have to request the list of languages and similar static resources multiple times. It simply stores the return of the function in a dictionary.
The cache is meant to be more of a utility decorator rather than something meant for serious storing of data. Sure you can use it to cache json responses but it's not optimized to do so.
Personally, I use cachetools
to cache the results when I need to.
Well got it, thanks for the answer and sharing the cachetools library.
Hello, sorry to open the issue just to ask a function. My question is:
permanent_cache()
works?get_user_stats()
response?get_user_stats()
response, should I use MongoDB to cache it?Thank you.