aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggBatch.php7
1 files changed, 7 insertions, 0 deletions
diff --git a/engine/classes/ElggBatch.php b/engine/classes/ElggBatch.php
index 4f8f6cae9..a5051d16a 100644
--- a/engine/classes/ElggBatch.php
+++ b/engine/classes/ElggBatch.php
@@ -206,6 +206,13 @@ class ElggBatch
* @return bool
*/
private function getNextResultsChunk() {
+ // reset memory caches after first chunk load
+ if ($this->chunkIndex > 0) {
+ global $DB_QUERY_CACHE, $ENTITY_CACHE;
+ $DB_QUERY_CACHE = $ENTITY_CACHE = array();
+ }
+
+ // always reset results.
$this->results = array();
if (!isset($this->validGetter)) {