不使用缓存的卷曲命令 [英] Curl command without using cache
本文介绍了不使用缓存的卷曲命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有没有办法告诉curl命令不要使用服务器的侧面缓存? 例如;我有这个curl命令:
Is there a way to tell curl command not to use server's side cache? e.g; I have this curl command:
curl -v www.example.com
我如何要求curl发送新的请求以不使用缓存?
how can I ask curl to send a fresh request to not use the cache?
注意:我正在终端中寻找可执行命令.
Note: I am looking for an executable command in the terminal.
推荐答案
我知道这是一个较旧的问题,但是我想为有相同问题的用户发布答案:
I know this is an older question, but I wanted to post an answer for users with the same question:
curl -H 'Cache-Control: no-cache' http://www.example.com
此curl命令服务器在其标头请求中从Web服务器返回未缓存的数据.
This curl command servers in its header request to return non-cached data from the web server.
这篇关于不使用缓存的卷曲命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文