Initial import

This is my first push of code to GitHub, made as a pull request for easier review
This needs more thought. Perhaps there should be an option for the user about what to treat as a real error?

Caching a 404 response for a page that genuinely doesn't exist, for example, is totally legitimate. 403 or 5xx errors maybe less so. 

For some applications it may be better to show a cached error page fast than to spend a long time getting a fresh error from the server. Imagine, for example, a site that is failing under heavy load.