gpt4 book ai didi

amazon-web-services - AWS API Gateway 缓存 POST 数据

转载 作者:行者123 更新时间:2023-12-04 23:57:31 25 4
gpt4 key购买 nike

我打开缓存来缓存 GET 请求,但它也适用于 POST,因为 post 没有查询字符串,它当前缓存 POST 一次并坚持使用它,无论 POST 正文如何。

有没有办法为 POST 方法关闭此功能或告诉缓存帖子正文具有缓存它的 key ?

最佳答案

我将从阅读 the documentation 开始仔细研究此功能。

您可以启用缓存 at the stage level ,您可以覆盖缓存设置 at the method level .您还可以指定 header 、URL 路径和查询字符串 to be used as the cache key .

目前尚不清楚您做了什么,但您应该能够执行以下操作之一来实现您的目标:

  1. 在阶段级别启用缓存,并在方法级别禁用 POST 方法。
  2. 在阶段级别禁用缓存,并在 GET 方法的方法级别启用缓存。

关于amazon-web-services - AWS API Gateway 缓存 POST 数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37348363/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com