Let's take a look at another contributed module for caching. This module will allow us to configure caching for our authenticated users. It is frequently referred to as the Authcache module and the project page is here: http://drupal.org/project/ authcache. The module will cache for both anonymous and authenticated users, and it will increase your page load and Drupal site performance because the page loads will be optimized to about 1-2 milliseconds (according to the module project description). To use this module for anonymous page caching is relatively straightforward. Setting it up for authenticated users will take more detailed and complex crafting.
As with the Memcache API module, you can choose to use Drupal database caching where the module will store all cached pages in the cache_page table.
If you do not want to save cached pages to the database (as the Cache Router module works), the Authcache module works with caching engines such as Memcache and the Memcache API module. The advantage — as the project page points out as a general benefit of a caching engine — is that the database will not be storing all the cached data and this will increase your site's performance.
The huge benefit of using this module for your site's performance is that it will greatly increase page load times. According to the module project page, you have a chance of getting page load times under 1 millisecond.
Let's go ahead and try out the module. First, make sure you have a Drupal cache handler module and engine installed, such as Cache Router or Memcache API. We're already using Memcache API, so let's continue to use that. To simplify our caching mechanisms, I'm going to disable Cache Router for the moment and just rely on Memcache API since we have that installed and configured. So, I'll disable Cache Router through my modules admin page and then I'll check my Memcache status to make sure that module is still running without issue.
Download the latest version of the Authcache module (6.x-1.0-rc1) for Drupal 6.x and install it in your /sites/all/modules folder. Enable the module on your modules admin page. Enable both the Authcache and the Authcache Example modules in your caching section. Save your module configuration.
Enabled Name Version Description
0 Authenticated User Page Caching for locigeci-in ¿¡nd anonymous users.
Required by: Authcache Example ^enabled)
Example module that displays a cachable Drupal block of customizable user
Depends on: Authcache (enabled)
Once enabled, the module will give you a message when you reload your modules admin page that you need to update your settings.php file in order to properly configure the Authcache module. It will also give you a link to your Site Configuration | Performance | Authcache configuration settings page. Let's look at both of these elements next.
Your settings.php file must be modified to enable Authcache ($conf['cache_inc']). See README.txt
Authcache has been enabled. Please configure your caching settings under Site Configuration -> Performance -> Authcache.
The configuration options have been saved
Was this article helpful?