Cache CGI for offloading content to cheap host

| | Comments (0)

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.

index.cgi

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. :-)

Categories

Leave a comment


About this Entry

This page contains a single entry by Jason Fesler published on May 10, 2005 1:47 PM.

Spam "from" gigo.com was the previous entry in this blog.

Yahoo site search box is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Powered by Movable Type 4.0