【发布时间】:2020-02-07 18:00:04
【问题描述】:
我正在调试一个烧瓶应用程序,并想查看我的简单缓存中存储了哪些值。有没有办法检索所有密钥? (就像使用字典一样......
cache = Cache()
cache.init_app(app, config={"CACHE_TYPE": "simple"})
cache.set("item-1", "red")
cache.set("item-2", "blue")
# I would like to do the following:
# cache.keys()
【问题讨论】: