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)