使用 python 在 Azure Functions 中缓存
Caching in Azure Functions using python
我在我的 azure 函数中使用 Azure Queue 作为触发器。
我的 azure 函数连接到 mongoDB 并获取一些集合。
其中一些集合对于所有队列作业都是通用的,从 1000 个文档到 100 万不等 Documents.I 需要缓存这些集合。
我不想使用任何外部缓存服务(Azure Redis 服务器等)。
有没有办法使用磁盘缓存(或任何其他类型的缓存)?
我正在使用 Python 3.5.2.
我已经使用 DiskCache 缓存了 mongoDB 个结果。
DiskCache is an Apache2 licensed disk and file backed cache library, written in pure-Python, and compatible with Django.
我在我的 azure 函数中使用 Azure Queue 作为触发器。
我的 azure 函数连接到 mongoDB 并获取一些集合。
其中一些集合对于所有队列作业都是通用的,从 1000 个文档到 100 万不等 Documents.I 需要缓存这些集合。
我不想使用任何外部缓存服务(Azure Redis 服务器等)。
有没有办法使用磁盘缓存(或任何其他类型的缓存)?
我正在使用 Python 3.5.2.
我已经使用 DiskCache 缓存了 mongoDB 个结果。
DiskCache is an Apache2 licensed disk and file backed cache library, written in pure-Python, and compatible with Django.