Cache CGI for offloading content to cheap host
The good news, is that I painted my motorcycle.
The bad news is, I posted a url to the pictures, and other folks are inline imaging that photo on various forums, and it is risking my colo bandwidth bill into overage.
The good news, is I've written a cache to offload these requests to, to run on a cheap shared hosting environment, where they bill by total bandwidth per month instead of on semi-peak usage.
Edit the file to suit your needs. Be sure to edit the part where you indicate what paths you are willing to cache and serve - this was meant to only serve the data I wanted to serve, and not to be the latest slashdot abuse host.
An example of the script in action:
http://cache.gigo.com/index.cgi/gallery.gigo.com/jfesler/st1300/.lowres/aag.jpg
index.cgi is the script itself. The path before it is where I placed it on a cheap host. The path after that, is the web url I want mirrored.
You can set the parameters on how often it should refresh a mirror. If there were no changes (and the source is not dynamic), then the mirror should be cheap to refresh.
There is no cache cleanup script (yet). I'll post that here, when I've gotten around to writing that. :-)

Leave a comment