Update – 5 Oct 2006: With the move to the new host, we’ve turned site caching off - at least for now. It was causing some problems with the cookies that store your name and email address so you don’t have to type those every time you make a comment. But if turning the caching off slows the site down dramatically, we’ll probably reinstate it. For now, let’s just see how it goes without.
To speed up page loads, and to reduce server load, we’ve decided to cache the most important parts of this site.
The page that is sent out to you is in plain old HTML. You can look at the source and see the code. However, up until yesterday, these pages did not actually exist on our server in that form. Whenever you viewed a page, that page would be compiled especially for you. The server would pick all the necessary bits and pieces out of the database and draw up the page, each and every time someone wanted to see it.
If you have a powerful enough server, and don’t ask a server to do too much at the same time (i.e. if you don’t share one server between too many sites), that isn’t a problem.
Obviously, basic economics means that the more money you spend, the bigger your share of a server’s capacity. Or better still, not having to share at all, or even having several servers hosting one site.
Needless to say, we’re poor, and are therefore limited not only in the amount of space and bandwidth we consume, but also database queries.
So we’ve made some changes yesterday as a result of which large parts of the site are now cached. This means that as soon as someone calls up a page, the server will still draw up the page from all the necessary pieces out of the database and send it to the visitor, but also store the page in the site cache. Now if someone else calls up the same page, there is no need for the server to make the whole page from scratch, it can simply send out the page as it was stored earlier. If you want to check which kind of page you got, you can look at the source code of a page: it’ll either say “fresh copy” or “cached copy” at the top and bottom of the page.
The cache is automatically flushed once per hour, so if you receive a cached copy, it’ll never be more than an hour old. The cache is also flushed after every change.
Please let us know if you spot any problems.