Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cachelib as backend #308

Merged
merged 20 commits into from
Mar 19, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions AUTHORS

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGES → CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

Version 1.2.0
-------------

Unreleased

- cachelib is now used as backend. PR `#308 <https://github.com/pallets-eco/flask-caching/pull/308>`_.


Version 1.10.1
--------------

Expand Down
7 changes: 4 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ Flask-Caching
:noindex:

Flask-Caching is an extension to `Flask`_ that adds caching support for
various backends to any Flask application. Besides providing support for all
`werkzeug`_'s original caching backends through a uniformed API,
it is also possible to develop your own caching backend by subclassing
various backends to any Flask application. By running on top of `cachelib`_
it supports all of `werkzeug`_'s original caching backends through a uniformed
API. It is also possible to develop your own caching backend by subclassing
:class:`flask_caching.backends.base.BaseCache` class.

Version support
Expand Down Expand Up @@ -700,3 +700,4 @@ Additional Information

.. _Flask: http://flask.pocoo.org/
.. _werkzeug: http://werkzeug.pocoo.org/
.. _cachelib: https://github.com/pallets/cachelib
68 changes: 39 additions & 29 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,109 +2,115 @@
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile requirements/dev.in
# pip-compile dev.in
#
alabaster==0.7.12
# via sphinx
attrs==21.2.0
attrs==21.4.0
# via pytest
babel==2.9.1
# via sphinx
cachelib==0.6.0
# via -r tests.in
certifi==2021.10.8
backports-entry-points-selectable==1.1.0
# via virtualenv
certifi==2021.5.30
# via requests
cfgv==3.3.1
# via pre-commit
charset-normalizer==2.0.4
charset-normalizer==2.0.10
# via requests
click==8.0.1
click==8.0.3
# via
# flask
# pip-tools
distlib==0.3.2
deprecated==1.2.13
# via redis
distlib==0.3.4
# via virtualenv
docutils==0.16
# via
# sphinx
# sphinx-tabs
filelock==3.0.12
filelock==3.4.2
# via
# tox
# virtualenv
flask==2.0.3
# via -r tests.in
identify==2.2.14
identify==2.4.4
# via pre-commit
idna==3.2
idna==3.3
# via requests
imagesize==1.2.0
imagesize==1.3.0
# via sphinx
importlib-metadata==4.10.1
# via sphinx
iniconfig==1.1.1
# via pytest
itsdangerous==2.0.1
# via flask
jinja2==3.0.1
jinja2==3.0.3
# via
# flask
# sphinx
markupsafe==2.0.1
# via jinja2
nodeenv==1.6.0
# via pre-commit
packaging==21.0
packaging==21.3
# via
# pallets-sphinx-themes
# pytest
# redis
# sphinx
# tox
pallets-sphinx-themes==2.0.2
# via -r docs.in
pep517==0.11.0
pep517==0.12.0
# via pip-tools
pip-tools==6.5.1
# via -r dev.in
platformdirs==2.3.0
platformdirs==2.4.1
# via virtualenv
pluggy==1.0.0
# via
# pytest
# tox
pre-commit==2.17.0
# via -r dev.in
psutil==5.8.0
psutil==5.9.0
# via pytest-xprocess
py==1.10.0
py==1.11.0
# via
# pytest
# tox
pygments==2.10.0
pygments==2.11.2
# via
# sphinx
# sphinx-tabs
pylibmc==1.6.1
# via -r tests.in
pyparsing==2.4.7
pyparsing==3.0.6
# via packaging
pytest==6.2.5
# via
# -r tests.in
# pytest-xprocess
pytest-xprocess==0.18.1
# via -r tests.in
pytz==2021.1
pytz==2021.3
# via babel
pyyaml==5.4.1
pyyaml==6.0
# via pre-commit
redis==3.5.3
redis==4.1.1
# via -r tests.in
requests==2.26.0
requests==2.27.1
# via sphinx
six==1.16.0
# via
# tox
# virtualenv
snowballstemmer==2.1.0
snowballstemmer==2.2.0
# via sphinx
sphinx==4.4.0
# via
Expand Down Expand Up @@ -136,20 +142,24 @@ toml==0.10.2
# pre-commit
# pytest
# tox
tomli==1.2.1
tomli==2.0.0
# via pep517
tox==3.24.5
# via -r dev.in
urllib3==1.26.6
urllib3==1.26.8
# via requests
virtualenv==20.7.2
virtualenv==20.13.0
# via
# pre-commit
# tox
werkzeug==2.0.1
werkzeug==2.0.2
# via flask
wheel==0.37.0
wheel==0.37.1
# via pip-tools
wrapt==1.13.3
# via deprecated
zipp==3.7.0
# via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down
30 changes: 17 additions & 13 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,47 @@
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile requirements/docs.in
# pip-compile docs.in
#
alabaster==0.7.12
# via sphinx
babel==2.9.1
# via sphinx
certifi==2021.5.30
certifi==2021.10.8
# via requests
charset-normalizer==2.0.4
charset-normalizer==2.0.10
# via requests
docutils==0.16
# via
# sphinx
# sphinx-tabs
idna==3.2
idna==3.3
# via requests
imagesize==1.2.0
imagesize==1.3.0
# via sphinx
jinja2==3.0.1
importlib-metadata==4.10.1
# via sphinx
jinja2==3.0.3
# via sphinx
markupsafe==2.0.1
# via jinja2
packaging==21.0
packaging==21.3
# via
# pallets-sphinx-themes
# sphinx
pallets-sphinx-themes==2.0.2
# via -r docs.in
pygments==2.10.0
pygments==2.11.2
# via
# sphinx
# sphinx-tabs
pyparsing==2.4.7
pyparsing==3.0.6
# via packaging
pytz==2021.1
pytz==2021.3
# via babel
requests==2.26.0
requests==2.27.1
# via sphinx
snowballstemmer==2.1.0
snowballstemmer==2.2.0
# via sphinx
sphinx==4.4.0
# via
Expand All @@ -67,5 +69,7 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
urllib3==1.26.6
urllib3==1.26.8
# via requests
zipp==3.7.0
# via importlib-metadata
1 change: 1 addition & 0 deletions requirements/tests.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ pytest-xprocess
pylibmc
redis
Flask
cachelib
30 changes: 19 additions & 11 deletions requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,51 @@
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile requirements/tests.in
# pip-compile tests.in
#
attrs==21.2.0
attrs==21.4.0
# via pytest
click==8.0.1
cachelib==0.6.0
# via -r tests.in
click==8.0.3
# via flask
deprecated==1.2.13
# via redis
flask==2.0.3
# via -r tests.in
iniconfig==1.1.1
# via pytest
itsdangerous==2.0.1
# via flask
jinja2==3.0.1
jinja2==3.0.3
# via flask
markupsafe==2.0.1
# via jinja2
packaging==21.0
# via pytest
packaging==21.3
# via
# pytest
# redis
pluggy==1.0.0
# via pytest
psutil==5.8.0
psutil==5.9.0
# via pytest-xprocess
py==1.10.0
py==1.11.0
# via pytest
pylibmc==1.6.1
# via -r tests.in
pyparsing==2.4.7
pyparsing==3.0.6
# via packaging
pytest==6.2.5
# via
# -r tests.in
# pytest-xprocess
pytest-xprocess==0.18.1
# via -r tests.in
redis==3.5.3
redis==4.1.1
# via -r tests.in
toml==0.10.2
# via pytest
werkzeug==2.0.1
werkzeug==2.0.2
# via flask
wrapt==1.13.3
# via deprecated
2 changes: 0 additions & 2 deletions src/flask_caching/backends/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
from flask_caching.backends.simplecache import SimpleCache
from flask_caching.backends.uwsgicache import UWSGICache

# TODO: Rename to "redis" when python2 support is removed


__all__ = (
"null",
Expand Down
Loading