为端点提供基本的缓存工具
项目描述
技术模块提供端点的基本缓存配置和工具。
目录
用法
端点中使用的示例
# get the name of the cache cache_name = endpoint._endpoint_cache_make_name("json") # check if the cache exists cached = endpoint._endpoint_cache_get(cache_name) if cached: result = cached else: result = json.dumps(env["my.model"]._get_a_very_expensive_computed_result()) # cache does not exist, create it endpoint._endpoint_cache_store(cache_name, result) resp = Response(result, content_type="application/json", status=200) result = dict(response=resp)
已知问题/路线图
添加缓存预热
错误跟踪器
错误在GitHub问题上跟踪。如果在那里遇到问题,请检查您的问题是否已被报告。如果您是第一个发现它的人,请通过提供详细且受欢迎的反馈来帮助我们解决问题。
请不要直接联系贡献者以寻求支持或技术问题的帮助。
致谢
贡献者
Simone Orsi <simone.orsi@camptocamp.com>
维护者
此模块由OCA维护。
OCA,或Odoo社区协会,是一个非营利组织,其使命是支持Odoo功能的协作开发并促进其广泛应用。
当前 维护者
此模块是GitHub上的OCA/web-api项目的一部分。
欢迎您贡献。有关如何贡献的详细信息,请访问https://odoo-community.org/page/Contribute。
项目详情
关闭
哈希值 for odoo14_addon_endpoint_cache-14.0.1.1.1-py3-none-any.whl
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 2386f7561bd72845b484416013f69330b874972d43b3c1e4f28da30eefc73468 |
|
MD5 | a1eb6369b59d2258b6c5c4a4cc7e45a7 |
|
BLAKE2b-256 | e689382b8d26af427a68b68ff218dd07ee30774477bfc12d89f464166d3871f3 |