[server] core: Replace flask-caching dependency with drop-in #893
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
CHANGES.rst
because this is a user-facing change or an important bugfixWhat changes does this Pull Request introduce?
core: Replace flask-caching dep with drop-in
Instead of relying on flask-caching and its dep cachelib, import a trimmed-down version into the repo as
utils/cache.py
.Why is this necessary?
While seeing pallets-eco/flask-caching#352 that currently breaks Isso, it became apparent that
Flask-Caching
has grown way too large and has gained dependencies of its own.Initially, Isso depended on
SimpleCache
andNullCache
fromwerkzeug.contrib
, which meant that it didn't have to import any new dependencies. In a later version, caching was removed from werkzeug and instead pushed into its own package, which Isso then had to import.With the newest release of
Flask-Caching
, there's now a hard dependency oncachelib
as well, in addition toflask
.Isso only uses
get()
,set()
anddelete()
cache functions and only for email/website hashes. We can drop all those dependencies and instead import a slimmed-down version on our own.