Skip to main content

Adds caching support to your Flask application

Project description


Build Status codecov PyPI Version Documentation Status License Code style: black

Adds easy cache support to Flask.

This is a fork of the Flask-Cache extension.

Flask-Caching also includes the cache module from werkzeug licensed under a BSD-3 Clause License.


Flask-Caching is available on PyPI and can be installed with:

pip install flask-caching

The Cache Extension can either be initialized directly:

from flask import Flask
from flask_caching import Cache

app = Flask(__name__)
# For more configuration options, check out the documentation
cache = Cache(app, config={'CACHE_TYPE': 'simple'})

Or through the factory method:

cache = Cache(config={'CACHE_TYPE': 'simple'})

app = Flask(__name__)

Compatibility with Flask-Cache

There are no known incompatibilities or breaking changes between the latest Flask-Cache release (version 0.13, April 2014) and the current version of Flask-Caching. Due to the change to the Flask-Caching name and the extension import transition, Python import lines like:

from flask.ext.cache import Cache

will need to be changed to:

from flask_caching import Cache

Python versions

Starting with version 1.8, Flask-Caching dropped Python 2 support. The library is tested against Python 3.5, 3.6, and PyPy 3.5.


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Flask-Caching, version 1.10.1
Filename, size File type Python version Upload date Hashes
Filename, size Flask_Caching-1.10.1-py3-none-any.whl (34.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size Flask-Caching-1.10.1.tar.gz (76.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page