]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Clearing caches in ElggBatch.
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 14 Feb 2011 05:23:16 +0000 (05:23 +0000)
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>
Mon, 14 Feb 2011 05:23:16 +0000 (05:23 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@8226 36083f99-b078-4883-b0ff-0f9b5a30f544

engine/classes/ElggBatch.php

index 4f8f6cae91362d3c925c3a2fc2f4101ed3396545..a5051d16a95a7e1cb09739d6973360bef8b21d41 100644 (file)
@@ -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)) {