summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJennifer Hodgdon2014-07-24 23:32:08 (GMT)
committer Jennifer Hodgdon2014-07-24 23:32:08 (GMT)
commit90de4ecc146a7ed1ae169699b4e845619ffdb36b (patch)
treeb2a3cf632347e08d8035eaa80d39d6803a472104
parent3ea44b6d1ddf65c20ecb45bb3a20c126c4e306ad (diff)
Issue #1261846 by catch, dawehner, brianV, Berdir, sun, xjm, sandipmkhairnar, marvil07, chrisjlee, Cottser, amitgoyal, Elijah Lynn, er.pushpinderrana: Document 1 MB cache limit in cache functions7.x
-rw-r--r--includes/cache.inc16
1 files changed, 10 insertions, 6 deletions
diff --git a/includes/cache.inc b/includes/cache.inc
index 09f4d75..207bf66 100644
--- a/includes/cache.inc
+++ b/includes/cache.inc
@@ -98,9 +98,11 @@ function cache_get_multiple(array &$cids, $bin = 'cache') {
* @param $data
* The data to store in the cache. Complex data types will be automatically
* serialized before insertion. Strings will be stored as plain text and are
- * not serialized.
+ * not serialized. Some storage engines only allow objects up to a maximum of
+ * 1MB in size to be stored by default. When caching large arrays or similar,
+ * take care to ensure $data does not exceed this size.
* @param $bin
- * The cache bin to store the data in. Valid core values are:
+ * (optional) The cache bin to store the data in. Valid core values are:
* - cache: (default) Generic cache storage bin (used for theme registry,
* locale date, list of simpletest tests, etc.).
* - cache_block: Stores the content of various blocks.
@@ -119,7 +121,7 @@ function cache_get_multiple(array &$cids, $bin = 'cache') {
* the administrator panel.
* - cache_path: Stores the system paths that have an alias.
* @param $expire
- * One of the following values:
+ * (optional) One of the following values:
* - CACHE_PERMANENT: Indicates that the item should never be removed unless
* explicitly told to using cache_clear_all() with a cache ID.
* - CACHE_TEMPORARY: Indicates that the item should be removed at the next
@@ -254,10 +256,12 @@ interface DrupalCacheInterface {
* The cache ID of the data to store.
* @param $data
* The data to store in the cache. Complex data types will be automatically
- * serialized before insertion.
- * Strings will be stored as plain text and not serialized.
+ * serialized before insertion. Strings will be stored as plain text and not
+ * serialized. Some storage engines only allow objects up to a maximum of
+ * 1MB in size to be stored by default. When caching large arrays or
+ * similar, take care to ensure $data does not exceed this size.
* @param $expire
- * One of the following values:
+ * (optional) One of the following values:
* - CACHE_PERMANENT: Indicates that the item should never be removed unless
* explicitly told to using cache_clear_all() with a cache ID.
* - CACHE_TEMPORARY: Indicates that the item should be removed at the next