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

Deprecate werkzeug.contrib.cache #72

Closed
lepture opened this issue Apr 26, 2018 · 5 comments
Closed

Deprecate werkzeug.contrib.cache #72

lepture opened this issue Apr 26, 2018 · 5 comments

Comments

@lepture
Copy link

lepture commented Apr 26, 2018

We are going to remove werkzeug.contrib.cache from werkzeug. Flask-Caching is depending on it, can you copy that part into your repo and maintain it in Flask-Caching.

pallets/werkzeug#1249

@neilsh
Copy link
Contributor

neilsh commented May 9, 2018

For reference, here's the code for werkzeug.contrib.cache: https://github.com/pallets/werkzeug/blob/master/werkzeug/contrib/cache.py

Flask-Caching relies on this module for the implementations of several of its caching backends:

https://github.com/sh4nks/flask-caching/blob/039d8aef5e3ebbb70c0f679f4e4452f80f594dd1/flask_caching/backends/backends.py#L11-L18

@dchevell
Copy link
Contributor

dchevell commented Jul 9, 2018

@lepture is this the sort of approach you hand in mind: https://github.com/dchevell/flask-caching

I copied over the code from werkzeug.contrib.cache, replaced all imports in the core library and in tests, and updated the documentation to reference the internal implementations. Werkzeug origins are still clear.

All tests pass, and I tried the modded version in a project of mine that uses Flask-Caching and found no unexpected behaviours.

I'm not 100% confident in opening a PR without confirming whether this approach is the one you're looking for, or one that @sh4nks is happy with.

@lepture
Copy link
Author

lepture commented Jul 9, 2018

Yes, you can start with a copy of werkzeug.contrib.cache. But I do believe the cache module could be far more better than the one in werkzeug.

@sh4nks
Copy link
Collaborator

sh4nks commented Jul 9, 2018

@dchevell that would be ok for now I think!

I actually had in mind to rewrite this extension to be a simple wrapper around dogpile.cache which would make maintaining this extension much easier. At the moment this is just an idea.. which lacks motivation and time :/

@sh4nks
Copy link
Collaborator

sh4nks commented Jul 10, 2018

I am closing this now as we don't depend on werkzeug.contrib.cache anymore. Yay! :)

@sh4nks sh4nks closed this as completed Jul 10, 2018
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants