The Authcache module offers page caching for both anonymous users and logged-in authenticated users. This allows Drupal/PHP to only spend 1-2 milliseconds serving pages, greatly reducing server resources.
Please note that enabling authenticated user caching will require modifying how your user-customized content displays on your pages. You should be an experienced Drupal developer if you choose to implement the full functionality of this module.
How does it work?
Authcache saves the final rendered HTML of a page to serve visitors. A separate cache is created for each user role as defined by the administrator, so some roles can be excluded if necessary.
Authcache places priority on serving pages to the visitor as fast as possible. After a page is loaded by the browser, a second HTTP request may be performed via Ajax. This initiates a lightweight DRUPAL_BOOTSTRAP_SESSION that allows SQL queries to be executed (such as updating the user "history" table or node "statistics" table), and returns any user-customized data to the page (such as form tokens or default values on a contact form).
What type of caching is used?
Authcache on Drupal 6
- Drupal database
- By default, Authcache will use the
cache_pagetable to store cached pages. To avoid hitting the database, download and install a cache handler module... - Cache Router
- Memcache API
- This module is similar to Cache Router, but functions differently and has features not found in Cache Router, such as caching the user sessions table.
This module supports APC, eAccellerator, XCache, Memcache, and the file system.
Most other cache handler modules can be configured to work with Authcache as well.
Authcache on Drupal 7
- Drupal database
- By default, Authcache will use the
cache_pagetable to store cached pages. To avoid hitting the database, download and install a cache handler module... - Contrib modules providing DrupalCacheInterface implementations
- For example:
- Memcache API Integration
- APC - Alternative PHP Cache Note that APC is not recommended as a page cache. Only use it for cache-bins with predictable size.
- File Cache
- Redis
- Mongodb
- Boost (Experimental support in authcache 7.x-2.x)
- Using boost as authcache backend it is possible to let Apache serve rendered HTML pages without bootstraping drupal at all
- External (In development 7.x-2.x)
- Do not store rendered pages but set the correct HTTP headers such that pages generated by authcache can be served from a caching reverse proxy like varnish (see #1981884: Add support for varnish (VCL and ESI))
The advantage in installing a cache handler module is that the caching engine (APC, Memcache, etc) is used instead of the database for all Drupal cache data, allowing for a sitewide performance increase regardless of whether pages are cached or not.
Authcache 7.x-2.x integrates with the Cache Expiration module. Also it features a modular architecture allowing easier integration with third-party modules and themes.
How effective is Authcache?
Caching prerendered HTML and gzipping using maximum compression allows for extremely fast page response times. When debug mode is enabled for Authcache, benchmarks are displayed. It's possible for Drupal+Authcache+APC to retrieve cached pages in under 1 millisecond. This represents a huge performance increase and the potential to handle hundreds of page requests/second!
What are the disadvantages?
In addition to more development time and testing, user-customized elements need to be scaled back. Please consider your goals and site functionality carefully, as the final HTML of each cached page must be the same for each user role. Cookies and the Ajax Drupal SESSION bootstrap (mentioned above) do allow for some minor customization. Extra modules/JavaScript may be needed to allow blocks of personalized content (authcache_example.module is included to demonstrate this usage). Also, hooks for contributed modules may need to be added for compatibility. This module is probably not suitable for Facebook-type sites where each page contains heavy user-centric content.
Authcache Handbook (Drupal 6)
Downloads
Recommended releases
Development releases
Project Information
- Maintenance status: Actively maintained
- Development status: Under active development
- Module categories: Performance and Scalability
- Reported installs: 1269 sites currently report using this module. View usage statistics.
- Downloads: 18,489
- Last modified: April 28, 2013
