diff --git a/docs/en/reference/caching.rst b/docs/en/reference/caching.rst index 5e6885deae8..86118cefe18 100644 --- a/docs/en/reference/caching.rst +++ b/docs/en/reference/caching.rst @@ -35,15 +35,13 @@ the default cache instance: new QueryCacheProfile(0, "some key", $cache); In order for the data to actually be cached its necessary to ensure that the entire -result set is read (the easiest way to ensure this is to use ``fetchAll``) and the statement -object is closed: +result set is read (the easiest way to ensure this is to use ``fetchAll``): :: executeCacheQuery($query, $params, $types, new QueryCacheProfile(0, "some key")); $data = $stmt->fetchAllAssociative(); - $stmt->closeCursor(); // at this point the result is cached .. warning::