You could try following ways to force not to keep Cache when curl
.
Note: The server may or may not be configured to respect the Cache-Control
header. Therefore, whether this method will work is dependent on the server or website we’re sending the HTTP
request to.
curl command with the Cache-Control header
$ curl -H 'Cache-Control: no-cache, no-store' http://www.example.com
Adding the Pragma HTTP Header
$ curl -H 'Pragma: no-cache' http://www.example.com
Finally, the most common way: bypass the cache by changing the URL
curl -H 'Cache-Control: no-cache, no-store' http://www.example.com?$(date +%s)
memcache
– Stripy-d
option? can you provide an example please? – Stripyhttp://www.example.com/?caching=off
You could also send a custom header: #357205 But of course your server side application has to understand those commands and act on them by turning the caching off. If anyone could disable a remote site's caching mechanisms, it would be a gaping security hole – Decennial