Introduction

LinkX includes a powerful page caching system that will reduce the load on your server and allow you to configure how long the caching periods last. This document will give an overview of how the page caching system works.

Page Caching Overview

The page caching system in LinkX is a time-based caching system which checks the time when the cached page was last updated and then performs an action based on that value. If the software finds that the page cache is still valid (i.e. the time period has not elapsed) that cached page is shown to the user instead of rebuilding the page with new data. If the cache period has elapsed, an updated version of the page is created and stored in the cache file for future use.

For each of the link directory templates (those with a filename that starts with directory-) you will be able to configure the cache lifetime through the General Settings interface. The cache lifetime is specified in seconds so you can fine tune the values for each of the pages. So, for example, consider this scenario: This same scenario plays out for all of the cached directory pages each time a user views that page. This system can provide a significant reduction in server load, since connecting to and retrieving data from a MySQL database is much more server intensive than simply displaying an already existing file.

Caching Recommendations

The best recommendation for caching is to use the largest cache lifetime values that you can. The more often the software has to update the cache pages, the more server load will be generated. The default cache lifetime settings that are configured when you initially install the software should be a good starting point, but of course you can adjust them to suit the needs of your site and server.