From 32a57e15534a0d98ff58cefae4f7fefe835d2f79 Mon Sep 17 00:00:00 2001
From: Mac_Weber <Mac_Weber@789986.no-reply.drupal.org>
Date: Tue, 18 Oct 2011 13:43:50 -0200
Subject: [PATCH 1/2] Issue #422352: improved static cache comments

---
 includes/bootstrap.inc |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index a7257c7..d60b2d8 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -3116,6 +3116,18 @@ function registry_update() {
  * }
  * @endcode
  *
+ * In cases where drupal_static needs to be called from a singleton class, the
+ * naming scheme "__CLASS__ . '::' . __METHOD__" should be used in
+ * substitute for __FUNCTION__.
+ *
+ * If more than one variable needs to be cached, append each name to the 
+ * function or method name with a ':' character, as in the following example.
+ *
+ * Example:
+ * @code
+ * $some_var = &drupal_static(__FUNCTION__ . ':some_var');
+ * @endcode
+ *
  * In a few cases, a function can have certainty that there is no legitimate
  * use-case for resetting that function's static variable. This is rare,
  * because when writing a function, it's hard to forecast all the situations in
@@ -3233,6 +3245,8 @@ function &drupal_static($name, $default_value = NULL, $reset = FALSE) {
  *
  * @param $name
  *   Name of the static variable to reset. Omit to reset all variables.
+ *   This parameter should never be omitted; except in extreme cases where all
+ *   data is being reset, such as with simpletest.
  */
 function drupal_static_reset($name = NULL) {
   drupal_static($name, NULL, TRUE);
-- 
1.7.7


From 4fd27288f5b9b55af59bb2d02adc7f0bbf81799c Mon Sep 17 00:00:00 2001
From: Mac_Weber <Mac_Weber@789986.no-reply.drupal.org>
Date: Tue, 18 Oct 2011 15:26:17 -0200
Subject: [PATCH 2/2] Issue #422352: improved static cache comments

---
 includes/bootstrap.inc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc
index d60b2d8..4057a23 100644
--- a/includes/bootstrap.inc
+++ b/includes/bootstrap.inc
@@ -3117,8 +3117,8 @@ function registry_update() {
  * @endcode
  *
  * In cases where drupal_static needs to be called from a singleton class, the
- * naming scheme "__CLASS__ . '::' . __METHOD__" should be used in
- * substitute for __FUNCTION__.
+ * naming scheme "__CLASS__ . '::' . __METHOD__" should be used in place of
+ * __FUNCTION__.
  *
  * If more than one variable needs to be cached, append each name to the 
  * function or method name with a ':' character, as in the following example.
-- 
1.7.7

