title: Writing a cache-everything/quick-response HTTP proxy
body: <p><strong>Are there any open source HTTP caching proxies I can use to give myself a good starting point?</strong></p>
  
  <p>I want to write a personal HTTP caching proxy to achieve the following purposes</p>
  
  <ol>
  <li>Serve content instantly even if the remote site is slow</li>
  <li>Serve content even if the network is down</li>
  <li>Allow me to read old content if I'd like to</li>
  </ol>
  
  <p>Why do I want to do this?</p>
  
  <ol>
  <li>The speed of Internet connection in my area is far from spectacular.</li>
  <li>I want to cache contents even if the HTTP headers tell me not to</li>
  <li><strong>I really don't like it when I couldn't quickly access content that I've read in the past.</strong></li>
  <li>I feel powerless when a website removes useful content and I find no way to get it back</li>
  </ol>
  
  <p>The project comprises</p>
  
  <ol>
  <li>A proxy running it on the local network (or perhaps on localhost), and</li>
  <li>A browser plugin or a desktop program to show content-updated notifications</li>
  </ol>
  
  <p>What's special about the proxy?</p>
  
  <ol>
  <li>The browser initiates an HTTP request</li>
  <li>The proxy <strong>serves the content first</strong>, if it's already in the cache</li>
  <li><strong>Then</strong> the proxy contacts the remote website and <strong>check whether the content has been updated</strong></li>
  <li>If the content has been updated, send a notification to the desktop/browser (e.g. to show a little popup or change the color of a plug-in icon), and download the content in the background.</li>
  <li><em>Every time</em> the proxy download new content, save it into the cache</li>
  <li>Let me choose to load the updated content or not (if not, stop downloading the new content; if yes, stream the new content to me)</li>
  <li>Let me assign rules to always/never load fresh content from certain websites</li>
  <li>Automatically set the rules if the proxy finds that (1) I always want to load fresh content from a certain website, or (2) the website's content frequently updates</li>
  </ol>
  
  <p>Note:</p>
  
  <ol>
  <li>Caching everything does not pose a security problem, as I'm the only one with physical access to the proxy, and the proxy is only serving me (from the local network)</li>
  <li>I think this is technologically feasible (let me know if you see any architectural problems)</li>
  <li>I haven't decided whether I should keep old versions of the webpages. But given that my everyday bandwidth usage is just 1-2 GB, a cheap 1TB hard drive can easily hold two years of data!</li>
  </ol>
  
  <p><strong>Does my plan make sense? Any suggestions/objections/recommedations?</strong></p>