Does CURL cache requests

abcachecdncurlubuntu-14.04

This is a pretty long question, so bear with me.

I wanted to stress my Akamai Server logged in from an AWS instance. So, I started running ab benchmark. However, they seemed ridiculously fast to download ~3 MB video files. Naturally I wanted to see what's going on. This is what I did to get the file

curl -v -o /dev/null

The above completed in ~5 seconds.

Next, I ran the same command again. This time, it completed in ~200ms! Naturally, my intuition says the file is being cached somewhere.

My questions:

  1. Does curl cache files? If so, is there a way to ignore it?
  2. If curl doesn't, does the ubuntu abstracts a cache beneath curl? If so, is there a way to ignore it?
  3. Given the requirements, do you think there could be a benchmarking tool apart from ab that could serve the purpose?

Thank you,
Akshay

Best Answer

The curl client isn't caching files, but the remote server network might well be. Try adding an arbitrary query string variable to the URL to see if you can reproduce it.

Related Topic