Skip to content
Myr

caching.rst

This file

Path

docs/patterns/caching.rst

18 lines · 676 bytes

Last changed by

Merge pull request #2993 from data-get/update-cache-documentationDavid Lordbefore adoption877da63

History of this file

Take it

1.. _caching-pattern:23Caching4=======56When your application runs slow, throw some caches in.  Well, at least7it's the easiest way to speed up things.  What does a cache do?  Say you8have a function that takes some time to complete but the results would9still be good enough if they were 5 minutes old.  So then the idea is that10you actually put the result of that calculation into a cache for some11time.1213Flask itself does not provide caching for you, but `Flask-Caching`_, an14extentions for Flask does. Flask-Caching supports various backends, and it is15even possible to develop your own caching backend.161718.. _Flask-Caching: https://flask-caching.readthedocs.io/en/latest/