Closed VincGargasson closed 3 years ago
@VincGargasson I think you need to add your cache-data-dir
to the .gitignore
;)
Thanks for the PR! The .gitignore needs to be updated, as well as the requirements.txt. The rest seems fine to me, could you post some references on how you used flask_caching so that I can take a closer look please?
@frgfm I'll change this right away. The way I used it is as follow:
main.py
and used filesystem config so the data are stored into a directory of the project easily (we can use redit database but it's more complex). cache.memoize()
function between callback and functionAs you can see, it's quite simple and I have discovered it last week on several forums. Please let me know if you still have some questions.
@VincGargasson Nice! Thanks for the explanation! Although, regarding the PR, you still need to remove the byte content files from the PR (you put the folder in .gitignore, but you need to remove those that were staged :upside_down_face: )
Let me know if you need help with that @VincGargasson :ok_hand:
GOAL OF THIS PR
Storing in background heaviest data in a cache function and being able to reuse it within 60 sec.
Function used : @cache from
flask-caching
How it works? :
main.py
cache.memoize()
decorator between the callback and function we aimapp/.cache