diff options
author | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-26 14:15:51 +0000 |
---|---|---|
committer | Gábor Hojtsy <gabor@hojtsy.hu> | 2007-08-26 14:15:51 +0000 |
commit | f0c0447e78dd2f7ff65e2a32c403d712776ceeb8 (patch) | |
tree | 389fbd43a2a851dac62545fbfb233e0a251b0e0c | |
parent | acb285576cff24cf98e54d8199de854b7b1f15e6 (diff) | |
download | brdo-f0c0447e78dd2f7ff65e2a32c403d712776ceeb8.tar.gz brdo-f0c0447e78dd2f7ff65e2a32c403d712776ceeb8.tar.bz2 |
#111127 follow up patchby myself: document the node_load internal cache and external cache, and how they interoperate
-rw-r--r-- | modules/node/node.module | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/modules/node/node.module b/modules/node/node.module index 3463582bb..b2b4613e4 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -601,6 +601,17 @@ function node_invoke_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) { /** * Load a node object from the database. * + * This function provides two levels of caching. The internal cache stores + * all nodes loaded in this request. Use the $reset argument to invalidate + * it. The cache API based cache stores all nodes throughout requests, + * until invalidated with cache_clear_all(). + * + * If the load operation was cached previously, we load the data from + * that cache, and no nodeapi load operations are called. That means, + * that we expect all load operations to return the same data and do + * not use any conditions on the user, language or anything else, + * which would limit what is stored in the node_load cache. + * * @param $param * Either the nid of the node or an array of conditions to match against in the database query * @param $revision |