You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Werkzeug is going to deprecate werkzeug.contrib.cache, there is not an easy way to maintain a built-in cache system for Flask. In this case, it is suggested that you pass a cache instance as parameter.
Cache Interface
You need to create your own cache object. A cache interface should contain these methods:
.get(key)
.delete(key)
.set(key, value, timeout=None)
Flask OAuth Client
If you need to support OAuth 1, cache is required. You can pass the cache object when initializing or init_app:
fromauthlib.flask.clientimportOAuthoauth=OAuth(app, cache=cache)
# or initialize lazilyoauth=OAuth()
oauth.init_app(app, cache=cache)
Flask OAuth 1 Server
Cache is used a lot in OAuth 1 provider. Instead of passing cache as a parameter,
you can use the helper functions to register hooks:
Per pallets/werkzeug#1249
Werkzeug is going to deprecate
werkzeug.contrib.cache
, there is not an easy way to maintain a built-in cache system for Flask. In this case, it is suggested that you pass acache
instance as parameter.Cache Interface
You need to create your own cache object. A cache interface should contain these methods:
.get(key)
.delete(key)
.set(key, value, timeout=None)
Flask OAuth Client
If you need to support OAuth 1,
cache
is required. You can pass the cache object when initializing orinit_app
:Flask OAuth 1 Server
Cache is used a lot in OAuth 1 provider. Instead of passing
cache
as a parameter,you can use the helper functions to register hooks:
Flask OAuth 2 Server
Pass
cache
instead of Flaskapp
intoregister_cache_authorization_code
:The built-in cache system will be removed in version 0.7.
The text was updated successfully, but these errors were encountered: