summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJennifer Hodgdon2014-03-28 18:25:10 (GMT)
committerJennifer Hodgdon2014-03-28 18:25:10 (GMT)
commit5b32c7bad3e3e8ff329c3a05aadac6c6e23dc2e1 (patch)
tree09d977f39604ad9303669c4938c502e8c8c7f480
parent8ad79cebb51c88781e892b87865d2606396c7e2b (diff)
Issue #2216543 by eojthebrave: Fix code example and some text in Config API topic
-rw-r--r--core/modules/system/core.api.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/core/modules/system/core.api.php b/core/modules/system/core.api.php
index 3930790..3799549 100644
--- a/core/modules/system/core.api.php
+++ b/core/modules/system/core.api.php
@@ -200,7 +200,6 @@
*
* Example:
* @code
- * $cache = \Drupal::cache();
* $cid = 'mymodule_example:' . \Drupal::languageManager()->getCurrentLanguage()->id();
*
* $data = NULL;
@@ -213,6 +212,12 @@
* }
* @endcode
*
+ * Note the use of $data and $cache->data in the above example. Calls to
+ * \Drupal::cache()->get() return a record that contains the information stored
+ * by \Drupal::cache()->set() in the data property as well as additional meta
+ * information about the cached data. In order to make use of the cached data
+ * you can access it via $cache->data.
+ *
* @section bins Cache bins
*
* Cache storage is separated into "bins", each containing various cache items.
@@ -300,9 +305,9 @@
*
* @section configuration Configuration
*
- * Each cache bin can be configured separately; for instance, each bin can use a
- * different cache backend, such as APC or Memcache. The default backend stores
- * the cached data in the Drupal database.
+ * By default cached data is stored in the database. This can be configured
+ * though so that all cached data, or that of an individual cache bin, uses a
+ * different cache backend, such as APC or Memcache, for storage.
*
* In a settings.php file, you can override the class used for a particular
* cache bin. For example, if your implementation of