flask/docs/patterns/caching.rst

17 lines
653 B
ReStructuredText
Raw Normal View History

2010-04-26 00:55:01 +08:00
Caching
=======
When your application runs slow, throw some caches in. Well, at least
it's the easiest way to speed up things. What does a cache do? Say you
have a function that takes some time to complete but the results would
still be good enough if they were 5 minutes old. So then the idea is that
you actually put the result of that calculation into a cache for some
time.
Flask itself does not provide caching for you, but `Flask-Caching`_, an
2019-02-24 18:40:23 +08:00
extension for Flask does. Flask-Caching supports various backends, and it is
even possible to develop your own caching backend.
2010-04-26 00:55:01 +08:00
.. _Flask-Caching: https://flask-caching.readthedocs.io/en/latest/