You are here

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

Same filename in this branch
  1. 7 README.txt
  2. 7 modules/authcache_example/README.txt
Same filename and directory in other branches
  1. 6 README.txt
  2. 7.2 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. Enabled the module and configure the Authcache settings
   (Site Configuration -> Performance -> Authcache).

2. Setup a Drupal cache handler module (optional, but strongly recommended for vastly improved performance)

   Download and enable a cache handler module, such as:

   -- Memcache API @ http://drupal.org/project/memcache
   -- Filecache @ http://drupal.org/project/filecache
   
   (note: for most purposes Filecache is both easier to set up AND faster than memcache.
   
3.Open your settings.php file and configure the cache handler module.

  Here are some examples:

  ----------------------
  BUILTIN DATABASE CACHE
  ----------------------
  // Only authcache backend is required if you use the built-in drupal
  // database cache.
  $conf['cache_backends'][] = 'sites/all/modules/authcache/authcache.inc';

  // Optional: Force database cache if you have other cache classes in place:
  $conf['cache_class_cache_page'] = 'DrupalDatabaseCache';

  ---------------
  MEMCACHE MODULE
  ---------------
  $conf['memcache_servers']  = array('localhost:11211' => 'default');
  
  $conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';  
  $conf['cache_backends'][] = 'sites/all/modules/authcache/authcache.inc'; 
  $conf['cache_class_cache_page'] = 'MemCacheDrupal';
  
  ---------------
  FILECACHE MODULE
  ---------------  
  
  $conf['cache_backends'][] = 'sites/all/modules/filecache/filecache.inc'; 
  $conf['cache_backends'][] = 'sites/all/modules/authcache/authcache.inc';
  $conf['cache_class_cache_page'] = 'DrupalFileCache';

  ------------------------------------------------------------------------
  If you are using a cache module other than FileCache / Memcache, or if the module
  is in a different parent directory than Authcache, define the the cache include
  path using:
  -------------------------------------------------------------------------
  
  $conf['cache_backends'][] = './sites/path/to/module/cacheinclude.inc';
  $conf['cache_backends'][] = 'sites/all/modules/authcache/authcache.inc';
  $conf['cache_class_cache_page'] = 'your_cache_hander_name';
  
  -------------------------------------------------------------------
  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.

4. (Optional) If a third-party cache-class is in place it is possible to avoid
   hitting the database completely. Add the following line to settings.php:

   $conf['page_cache_without_database'] = TRUE;

   Please note that it is necessary to hard-code all the settings affecting
   delivery of cached pages in settings.php in that case.

5. Goto Configuration > Development > Performance > Authcache and enable with appropriate settings

6. 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).
    $$_authcache_is_cacheable 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

D7 port by Simon Gardner
Email: slgard@gmail.com
Drupal: http://drupal.org/user/620692

================
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. Enabled the module and configure the Authcache settings
  14. (Site Configuration -> Performance -> Authcache).
  15. 2. Setup a Drupal cache handler module (optional, but strongly recommended for vastly improved performance)
  16. Download and enable a cache handler module, such as:
  17. -- Memcache API @ http://drupal.org/project/memcache
  18. -- Filecache @ http://drupal.org/project/filecache
  19. (note: for most purposes Filecache is both easier to set up AND faster than memcache.
  20. 3.Open your settings.php file and configure the cache handler module.
  21. Here are some examples:
  22. ----------------------
  23. BUILTIN DATABASE CACHE
  24. ----------------------
  25. // Only authcache backend is required if you use the built-in drupal
  26. // database cache.
  27. $conf['cache_backends'][] = 'sites/all/modules/authcache/authcache.inc';
  28. // Optional: Force database cache if you have other cache classes in place:
  29. $conf['cache_class_cache_page'] = 'DrupalDatabaseCache';
  30. ---------------
  31. MEMCACHE MODULE
  32. ---------------
  33. $conf['memcache_servers'] = array('localhost:11211' => 'default');
  34. $conf['cache_backends'][] = 'sites/all/modules/memcache/memcache.inc';
  35. $conf['cache_backends'][] = 'sites/all/modules/authcache/authcache.inc';
  36. $conf['cache_class_cache_page'] = 'MemCacheDrupal';
  37. ---------------
  38. FILECACHE MODULE
  39. ---------------
  40. $conf['cache_backends'][] = 'sites/all/modules/filecache/filecache.inc';
  41. $conf['cache_backends'][] = 'sites/all/modules/authcache/authcache.inc';
  42. $conf['cache_class_cache_page'] = 'DrupalFileCache';
  43. ------------------------------------------------------------------------
  44. If you are using a cache module other than FileCache / Memcache, or if the module
  45. is in a different parent directory than Authcache, define the the cache include
  46. path using:
  47. -------------------------------------------------------------------------
  48. $conf['cache_backends'][] = './sites/path/to/module/cacheinclude.inc';
  49. $conf['cache_backends'][] = 'sites/all/modules/authcache/authcache.inc';
  50. $conf['cache_class_cache_page'] = 'your_cache_hander_name';
  51. -------------------------------------------------------------------
  52. If no cache handler is setup or defined, Authcache will fallback to Drupal core
  53. database cache tables and "Authcache Debug" will say "cache_inc: database"
  54. If you are experimenting with multiple caching systems (db, apc, memcache),
  55. make sure to clear the cache each time you switch to remove stale data.
  56. 4. (Optional) If a third-party cache-class is in place it is possible to avoid
  57. hitting the database completely. Add the following line to settings.php:
  58. $conf['page_cache_without_database'] = TRUE;
  59. Please note that it is necessary to hard-code all the settings affecting
  60. delivery of cached pages in settings.php in that case.
  61. 5. Goto Configuration > Development > Performance > Authcache and enable with appropriate settings
  62. 6. Modify your theme by tweaking user-customized elements (the final HTML
  63. must be the same for each user role). Template files (e.g., page.tpl.php)
  64. will have several new variables:
  65. $user_name to display the logged-in user name
  66. $user_link to display the name linked to their profile (both work for
  67. cached and non-cached pages).
  68. $$_authcache_is_cacheable is set to TRUE in all template hooks if the page
  69. is to be cached.
  70. ===================
  71. UPGRADING FROM BETA
  72. ===================
  73. If you are upgrading from a beta version (if you have been using Authcache before
  74. 2009-09-13), please delete the "authcache" module directory and then extract the new release.
  75. "ajax_authcache.php" also no longer needs to be in Drupal root directory. Make sure to follow
  76. the new configuration settings above (like downloading the latest Cache Router and using
  77. the correct $conf values in settings.php).
  78. =================
  79. CACHE FLUSH NOTES
  80. =================
  81. Page cache is cleared when cron.php is executed. This is normal Drupal core behavior.
  82. ========================
  83. Authcache Example Module
  84. ========================
  85. Please see ./modules/authcache_example for a demonstration on how to cache
  86. blocks of user-customized content.
  87. ======
  88. Author
  89. ======
  90. Developed & maintained by Jonah Ellison.
  91. Demo: http://authcache.httpremix.com
  92. Email: jonah [at] httpremix.com
  93. Drupal: http://drupal.org/user/217669
  94. D7 port by Simon Gardner
  95. Email: slgard@gmail.com
  96. Drupal: http://drupal.org/user/620692
  97. ================
  98. Credits / Thanks
  99. ================
  100. - "Cache Router" module (Steve Rude) for the caching system/API
  101. - "Boost" module (Arto Bendiken) for some minor code & techniques