更新时间:2025-08-15 GMT+08:00
ProxyCacheContent
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
cache_key |
否 |
PluginProxyCacheKey object |
根据配置参数作为响应缓存键值,cache_key为必填项,因此三个参数system_params、parameters、headers至少有一个参数进行配置。 |
cache_http_status_and_ttl |
否 |
Array of PluginProxyCacheHttpStatusTtl objects |
可缓存的HTTP状态码以及对应的缓存时间。 |
client_cache_control |
否 |
允许客户端通过Cache-Control头来影响缓存策略。 |
|
cacheable_headers |
否 |
Array of strings |
允许缓存的后端Headers, 默认只缓存Content-Type,Content-Encoding,Content-Language头。支持最多20个参数,参数长度为1~64个字符。无法添加API网关增加的系统响应头(x-apig-*,x-request-id等)。 |
参数 |
是否必选 |
参数类型 |
描述 |
---|---|---|---|
system_params |
否 |
Array of strings |
使用网关内置系统参数作为响应缓存键值。 网关内置参数取值及对应含义:
|
parameters |
否 |
Array of strings |
使用请求query参数作为响应缓存键值。 |
headers |
否 |
Array of strings |
使用请求头作为响应缓存键值。 |
父主题: 数据结构(插件内容定义)