How to stop the virtual server from caching my out-going http requests?
I have a 512MB droplet that works great, and am quite happy with DigitalOcean.
Recently, I noticed that the droplet will cache my out-going http requesets. For example, I used
wget http://some.dynamic.website.com to fetch its
index.html. I got exactly the same file every time (even the linux file meta data was the same), even though the content of the page had actually changed which was verified by visiting it directly from my local web browser. I tried
curl instead, I got a new file, but still filled with old content.
Apparently, the droplet had cached the out-going http requests (as well as generated files by a particular program?). This will cut down physical network traffic significantly, thus benifit DigitalOcean, and in most cases, the user as well. However, if I know the target webpage updates frequently and mean to get the latest content, I should be able the do so.
As a reference, I created a new droplet, which turned out behaving differently: it gave me the latest content very time. While for my a month old working droplet, the content updated once or twice per day. It seems that DigitalOcean relies on some internal statistics to determine whether and how much its caching machinary is used.
So my questions are:
- Is this feature or limitation unavoidable? Is there any work-around?
- Is this related to my enabling VirtI/O?
- What's the internal criteria that controls this cache mechanism (if it is not a secret:)?