You are here

README.txt in Authenticated User Page Caching (Authcache) 6

Same filename in this branch
  1. 6 README.txt
  2. 6 modules/authcache_example/README.txt
Same filename and directory in other branches
  1. 7.2 README.txt
  2. 7 README.txt
===========================================
Authenticated User Page Caching (Authcache)
===========================================

The Authcache module offers page caching for both anonymous users and logged-in
authenticated users. This allows Drupal/PHP to spend only 1-2 milliseconds
serving pages and greatly reduces server resources.

Please visit:

  http://drupal.org/project/authcache

For information, updates, configuration help, and support.

============
Installation
============

1. Setup a Drupal cache handler module (optional, but strongly recommended)

   Download a cache handler module, such as:

   -- Cache Router @ http://drupal.org/project/cacherouter (supports APC, eAcc, XCache, and Memcache), or
   -- Memcache API @ http://drupal.org/project/memcache

  Open your settings.php file and configure the cache handler module.

  Here are some examples:

  ------------
  CACHE ROUTER
  ------------
  $conf['cacherouter'] = array(
    'default' => array(
      'engine' => 'apc',               // apc, memcache, db, file, eacc or xcache
      'server' => array(),             // memcached (host:port, e..g, 'localhost:11211')
      'shared' => TRUE,                // memcached shared single process
      'prefix' => '',                  // cache key prefix (for multiple sites)
      'path' => 'files/filecache',     // file engine cache location
      'static' => FALSE,               // static array cache (advanced)
    ),
  );

  ---------------
  MEMCACHE MODULE
  ---------------
  $conf['memcache_servers']  = array('localhost:11211' => 'default');


2. In settings.php, make sure $conf['cache_inc'] loads Authcache:

  $conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';

  Authcache will automatically try to include the cache handler module. If you
  are using a cache module other than Cache Router or Memcache, or if the module
  is in a different parent directory than Authcache, define the the cache include
  path using:

  $conf['cache_inc_via_authcache'] = './sites/path/to/module/cacheinclude.inc';

  If no cache handler is setup or defined, Authcache will fallback to Drupal core
  database cache tables and "Authcache Debug" will say "cache_inc: database"
  
  If you are experimenting with multiple caching systems (db, apc, memcache),
  make sure to clear the cache each time you switch to remove stale data.

3. Enabled the module and configure the Authcache settings
   (Site Configuration -> Performance -> Authcache).

4. Modify your theme by tweaking user-customized elements (the final HTML
   must be the same for each user role). Template files (e.g., page.tpl.php)
   will have several new variables:

    $user_name to display the logged-in user name
    $user_link to display the name linked to their profile (both work for
      cached and non-cached pages).
    $is_page_authcache is set to TRUE in all template hooks if the page
      is to be cached.

===================
UPGRADING FROM BETA
===================

If you are upgrading from a beta version (if you have been using Authcache before
2009-09-13), please delete the "authcache" module directory and then extract the new release.

"ajax_authcache.php" also no longer needs to be in Drupal root directory.  Make sure to follow
the new configuration settings above (like downloading the latest Cache Router and using
the correct $conf values in settings.php).

=================
CACHE FLUSH NOTES
=================

Page cache is cleared when cron.php is executed.  This is normal Drupal core behavior.

========================
Authcache Example Module
========================

Please see ./modules/authcache_example for a demonstration on how to cache
blocks of user-customized content.

======
Author
======

Developed & maintained by Jonah Ellison.

Demo: http://authcache.httpremix.com

Email: jonah [at] httpremix.com
Drupal: http://drupal.org/user/217669

================
Credits / Thanks
================

- "Cache Router" module (Steve Rude) for the caching system/API
- "Boost" module (Arto Bendiken) for some minor code & techniques

File

README.txt
View source
  1. ===========================================
  2. Authenticated User Page Caching (Authcache)
  3. ===========================================
  4. The Authcache module offers page caching for both anonymous users and logged-in
  5. authenticated users. This allows Drupal/PHP to spend only 1-2 milliseconds
  6. serving pages and greatly reduces server resources.
  7. Please visit:
  8. http://drupal.org/project/authcache
  9. For information, updates, configuration help, and support.
  10. ============
  11. Installation
  12. ============
  13. 1. Setup a Drupal cache handler module (optional, but strongly recommended)
  14. Download a cache handler module, such as:
  15. -- Cache Router @ http://drupal.org/project/cacherouter (supports APC, eAcc, XCache, and Memcache), or
  16. -- Memcache API @ http://drupal.org/project/memcache
  17. Open your settings.php file and configure the cache handler module.
  18. Here are some examples:
  19. ------------
  20. CACHE ROUTER
  21. ------------
  22. $conf['cacherouter'] = array(
  23. 'default' => array(
  24. 'engine' => 'apc', // apc, memcache, db, file, eacc or xcache
  25. 'server' => array(), // memcached (host:port, e..g, 'localhost:11211')
  26. 'shared' => TRUE, // memcached shared single process
  27. 'prefix' => '', // cache key prefix (for multiple sites)
  28. 'path' => 'files/filecache', // file engine cache location
  29. 'static' => FALSE, // static array cache (advanced)
  30. ),
  31. );
  32. ---------------
  33. MEMCACHE MODULE
  34. ---------------
  35. $conf['memcache_servers'] = array('localhost:11211' => 'default');
  36. 2. In settings.php, make sure $conf['cache_inc'] loads Authcache:
  37. $conf['cache_inc'] = './sites/all/modules/authcache/authcache.inc';
  38. Authcache will automatically try to include the cache handler module. If you
  39. are using a cache module other than Cache Router or Memcache, or if the module
  40. is in a different parent directory than Authcache, define the the cache include
  41. path using:
  42. $conf['cache_inc_via_authcache'] = './sites/path/to/module/cacheinclude.inc';
  43. If no cache handler is setup or defined, Authcache will fallback to Drupal core
  44. database cache tables and "Authcache Debug" will say "cache_inc: database"
  45. If you are experimenting with multiple caching systems (db, apc, memcache),
  46. make sure to clear the cache each time you switch to remove stale data.
  47. 3. Enabled the module and configure the Authcache settings
  48. (Site Configuration -> Performance -> Authcache).
  49. 4. Modify your theme by tweaking user-customized elements (the final HTML
  50. must be the same for each user role). Template files (e.g., page.tpl.php)
  51. will have several new variables:
  52. $user_name to display the logged-in user name
  53. $user_link to display the name linked to their profile (both work for
  54. cached and non-cached pages).
  55. $is_page_authcache is set to TRUE in all template hooks if the page
  56. is to be cached.
  57. ===================
  58. UPGRADING FROM BETA
  59. ===================
  60. If you are upgrading from a beta version (if you have been using Authcache before
  61. 2009-09-13), please delete the "authcache" module directory and then extract the new release.
  62. "ajax_authcache.php" also no longer needs to be in Drupal root directory. Make sure to follow
  63. the new configuration settings above (like downloading the latest Cache Router and using
  64. the correct $conf values in settings.php).
  65. =================
  66. CACHE FLUSH NOTES
  67. =================
  68. Page cache is cleared when cron.php is executed. This is normal Drupal core behavior.
  69. ========================
  70. Authcache Example Module
  71. ========================
  72. Please see ./modules/authcache_example for a demonstration on how to cache
  73. blocks of user-customized content.
  74. ======
  75. Author
  76. ======
  77. Developed & maintained by Jonah Ellison.
  78. Demo: http://authcache.httpremix.com
  79. Email: jonah [at] httpremix.com
  80. Drupal: http://drupal.org/user/217669
  81. ================
  82. Credits / Thanks
  83. ================
  84. - "Cache Router" module (Steve Rude) for the caching system/API
  85. - "Boost" module (Arto Bendiken) for some minor code & techniques