Skip to content

singulared/flask-caching

 
 

Repository files navigation

Flask-Caching

Build Status Coverage Status PyPI Version Documentation Status License

Adds easy cache support to Flask.

This is a fork of the Flask-Cache extension.

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

Links

About

Continuation of the Flask-Cache Extension.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.5%
  • Other 0.5%