Cache Considerations

There are several well established caching solutions available such as Varnish, MemCache, xCache etc. These are all different technologies which can work together or individually to speed up your sites.

While each of the solutions work in a different way that require different approaches to implement the caching, it is always best to look at introducing the idea of caching early in your sites development.

The reason being is that there can be some elements of the site which you will not be able to serve from a cache without a little thought. An example would be language selection, if your site allows multiple languages for a single page being served from a single URL and this being selected based on location or simple cookie then you will have problems if you introduce full page caching.

Once your page is in the cache, lets say in Spanish, then it will be served from the cache until it is expired – meaning that the page request will never make it through to Apache to get the location or your cookie is never read by PHP because, again, the request hasn’t made it through to your web server. This means that no matter your location or cookie settings, you will see the Spanish version of the page.

Now, that is an extreme example of how using caching can have unexpected results, however it does happen from time to time. Especially if caching is attempted to be retro fitted or the plugin which enables it is turned on at the end of development.

Caching is great and we have seen some amazing results with it enabled, but please remember it is something which should be tested throughout your development process.

This entry was posted in Managed Hosting. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>