Today I’ve added what I believe are the final touches to the website back end. The main change is that I have finally been able to enable caching fully so the website will run much, much faster and reduce the load on my hosts server.
I thought in this post I had also better explain the architecture of the website and its caching a little bit for other people that would like to write a Ruby on Rails system for themselves. The website structure is based primarily on the 4 sections you can see in the navigation bar at the top of the page plus separate administration and account sections.
Only the 4 sections in the navigation bar have any sort of caching applied to them, all areas of these sections use page caching rather than other forms of caching, as it is generally faster. However in setting up caching I came across the problem of aspects of pages that require regular, specific modification such as the login information on the right hand side of the website or comments in blog pages, remained unchanged due to the cache. I could have sorted this by continually cleaning the caches or using fragment caching, but I wanted the website to be as fast as possible. I got around this problem through the use of AJAX.
I will write something more in depth soon, for now try http://www.railsenvy.com/2007/2/28/rails-caching-tutorial for all your caching needs.