jagerzhang opened a new issue #5453:
URL: https://github.com/apache/apisix/issues/5453


   ### Issue description
   
   Nginx 的 proxy-cache 可以动态设置TTL,比如:
   ```
   proxy_cache_valid 200 1m; # 响应码为200的缓存1分钟
   proxy_cache_valid 304 1h; # 响应码为304的缓存1小时
   ...
   ```
   但是APISIX 文档提到:`The cache expiration time cannot be configured dynamically. 
The expiration time can only be set by the upstream response header Expires or 
Cache-Control, and the default cache expiration time is 10s if there is no 
Expires or Cache-Control in the upstream response header`
   
   意思是完全看后端的过期设置来定,否则就按config.yml 
默认的cache_ttl,感觉不是那么灵活,是否可以开放下,让我们可以在路由里面自行设置缓存TTL,并可以强制缓存(Nginx的 proxy-cache 
还支持proxy_ignore_headers 忽略后端缓存申明...)
   
   ### Environment
   
   - apisix version (cmd: `apisix version`): 2.10.0


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to