jagerzhang commented on issue #5453:
URL: https://github.com/apache/apisix/issues/5453#issuecomment-977340547


   @spacewander @shuaijinchao @tzssangglass 从APISIX的ngx模板来看,这里也是用的Nginx原生的 
`proxy_cache_valid` 
指令来缓存的:https://github.com/apache/apisix/blob/fa8a34f72d4de45a42390d17ca27aa9f808deb83/apisix/cli/ngx_tpl.lua#L624
   
   在使用Nginx的时候 `proxy_cache_valid` 
是可以支持给指定的响应码定义不同的缓存时间的,也就是说可以配置多条`proxy_cache_valid`指令,比如:
   ```
   proxy_cache_valid 200 30m; # 200响应的请求缓存30分钟
   proxy_cache_valid 304 1d; # 304响应的请求缓存1天
   ....
   ```
   是非常灵活的,其实也非常希望APISIX能继续保留这个特性,可以在插件配置里面灵活的设置不同响应码缓存自定义时长。


-- 
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