Adds caching support to your Flask application
Project description
Flask-Caching
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.
Setup
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__)
cache.init_app(app)
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.
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file Flask-Caching-1.10.1.tar.gz
.
File metadata
- Download URL: Flask-Caching-1.10.1.tar.gz
- Upload date:
- Size: 76.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf19b722fcebc2ba03e4ae7c55b532ed53f0cbf683ce36fafe5e881789a01c00 |
|
MD5 | 31e5fb56f57bdbd3cbf2fd77cece82ac |
|
BLAKE2b-256 | 4f204a17847f37b31f24ff20d9e2731f9a947c5ea4fc8a5e410dc44fd40ff6fc |
Provenance
File details
Details for the file Flask_Caching-1.10.1-py3-none-any.whl
.
File metadata
- Download URL: Flask_Caching-1.10.1-py3-none-any.whl
- Upload date:
- Size: 34.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcda8acbc7508e31e50f63e9b1ab83185b446f6b6318bd9dd1d45626fba2e903 |
|
MD5 | 0bbaf65e4dd0e2386e876c5094ce8642 |
|
BLAKE2b-256 | bd63f8fe759cfe4fa8075f77581af5dad632cea8578881c843c679c103c34815 |