On caching of websites

    Mitch talks about an article about moving from an IBM Websphere based weather.com to a Linux and open source based environment. He makes a passing comment about cachability, and that caching would improve the performance of the site.

    I think that the IT industry has lost something over the last couple of years, and I think it's time for it to come back. That thing is static content. I see no reason that a largely static site such as weather.com (people read the weather, don't change it, and the content updates regularly, but nowhere near as frequently as once per click).

    So, why not write an engine to generate the entire content of the site from templates, and then dump the output into a bunch of files on disc to serve? In fact, when you update the data, just change the file on disc and let the new file get served out when it's good and ready. This keeps processor load as low as possible while serving, and in fact probably makes the whole thing easier to debug. It's how my site is done too, and it makes the box that's hosting it much more responsive than it used to be under a dynamic workload.

    Everything should be static, unless you can't possibly do it without some runtime code.

    Technorati tags for this post:

posted at: 23:46 | path: /dotnet | permanent link to this entry