/[drupal]/contributions/modules/advcache/README.txt
ViewVC logotype

Contents of /contributions/modules/advcache/README.txt

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.9 - (show annotations) (download)
Thu Feb 26 13:39:12 2009 UTC (8 months, 4 weeks ago) by mikejoconnor
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +26 -9 lines
File MIME type: text/plain
#242121 Merging the DRUPAL-5 branch with head
1 Advanced caching module by Robert Douglass
2 http://drupal.org/project/advcache
3 Contact: http://drupal.org/user/5449/contact
4
5 For Drupal 5.x, specifically rolled against Drupal 5.10
6
7 ## What it does ##
8 The advanced caching module is mostly a set of patches and a supporting module
9 to bring caching to Drupal core in places where it is needed yet currently
10 unavailable. These include caching nodes, comments, taxonomy (terms, trees,
11 vocabularies and terms-per-node), path aliases, and search results.
12
13 The module maintains a series of dedicated cache tables and utilizes Drupal's
14 caching API to safely and effeciently cache data. The main beneficiary from
15 these caching strategies will be authenticated users who have only one role
16 (ie, non-admins). This is a group of site users that are traditionally unaffected
17 by Drupal's page cache mechanism.
18
19 ## How it does it ##
20 Beyond installing and enabling the advcache module, you must apply some or all
21 of the patches that come with it. The typical pattern for applying patches is:
22
23 cd path/to/Drupal/
24 patch < sites/all/modules/advcache/search_cache.patch
25
26 You may have to answer some questions about the locations of the files that
27 are to be patched.
28
29 Here is a description of the included patches and whether there are any reasons
30 you shouldn't use them. WARNING: Three of the caching patches are known to have bugs in them and have been marked as broken. Please don't use them and revert them if you have applied them. Of course, patches to fix them are welcome!:
31
32 block_cache.patch - Caches the list of enabled blocks per user per theme. This
33 avoids a very expensive query and the processing of the resultset in PHP.
34 This patch shaves 1.5 ms off of each and every page load, anonymous as well as
35 authenticated, on my MacBook. This patch is compatible with the blockcache module.
36 In fact, the two compliment each other.
37
38 block_cache.patch - Caches the list of enabled blocks per user per theme. This
39 avoids a very expensive query and the processing of the resultset in PHP.
40 This patch shaves 1.5 ms off of each and every page load, anonymous as well as
41 authenticated, on my MacBook. This patch is compatible with the blockcache module.
42 In fact, the two compliment each other.
43
44 comment_cache.patch - Caches built comments. "New" markers show up as expected
45 and you will still be able to change the display of the comments (flat, threaded
46 etc.).
47
48 BROKEN forum_cache.patch - Caches the forum structure, which is a relatively heavy
49 block of PHP code with several SQL queries. This patch violates any
50 modules that rewrite taxonomy queries. Please notify me of examples of modules
51 that use db_rewrite_sql to rewrite taxonomy queries so that I can update the
52 documentation. If you have any such modules do not apply this patch.
53
54 node_cache.patch - Caches built nodes. Nodes are cached using a key that is a
55 combination of node id and the unique combination of roles that a user has, so this
56 is guaranteed to play safe with role-based access schemes. By default, node_cache
57 will not cache poll nodes, as poll's need to determine whether or not a user has
58 before displaying a node is broken by the caching.
59
60 BROKEN path_cache.patch - Caches the results of drupal_lookup_path() per page. If you
61 don't have the path module turned on and you don't have any path aliases at all,
62 you don't need this patch. Otherwise this will cut one query per page for every
63 link on that page. Thus if you have pages that have hundreds of links, this patch
64 will cut hundreds of queries from that page. This patch is the same patch that
65 is currently found here, minus the changes to system.module and system.install:
66 http://drupal.org/node/100301
67
68 BROKEN search_cache.patch - Caches search results for popular search queries for
69 authenticated, non-admin users who have only one user role. This patch cannot
70 work with any node_access moudules (such as organic groups). The patch is smart
71 enough to do nothing if you have modules that control node access installed,
72 but if this is the case then you are better of not applying the patch.
73
74 taxonomy_cache.patch - Caches built taxonomy trees, terms and vocabularies. Most
75 importantly, it caches the terms-per-node for nodes. This patch violates any
76 modules that rewrite taxonomy queries. Please notify me of examples of modules
77 that use db_rewrite_sql to rewrite taxonomy queries so that I can update the
78 documentation. If you have any such modules do not apply this patch.
79
80 ## Excluding certain content types from being cached ##
81
82 Some content types like poll or advpoll cannot be cached with the node_cache.patch without breaking. To avoid this, or to prevent any given content type from being cached, set a variable in $conf in settings.php like follows:
83 <?php
84 $conf = array(
85 'advcache_node_exclude_types' => array('poll', 'mytype1', 'mytype2' ....),
86 );
87 ?>
88
89 ## Upgrading to new releases Advcache ##
90
91 Eventually new releases of the advcache module will appear. Improvements and
92 bugfixes will come along and you'll want to upgrade. Since you have patched
93 core Drupal files, there are special considerations. You must first unpatch
94 Drupal. Fortunately this is not any harder than patching in the first place.
95 To unpatch, you repeat the process that you used when patching, only you use
96 the -R flag to tell patch to do it in reverse:
97
98 cd path/to/Drupal/
99 patch -R < sites/all/modules/advcache/search_cache.patch
100
101 ## Memcache or other caching backends ##
102 The fact that these patches all use the generic Drupal caching API is a boon to
103 anyone who wants to use other caching backends. In particular, top site speeds
104 can be achieved using these patches in conjunction with the Memcache API and Int-
105 egration project: http://drupal.org/project/memcache
106
107 ## TODO ##
108 - Benchmarks
109 - Simpletest integration

  ViewVC Help
Powered by ViewVC 1.1.2