aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggBatch.php
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-14 05:23:16 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-02-14 05:23:16 +0000
commit574e2eb0df4bc454e847e1974e04c0d85aa661f7 (patch)
tree1de44458b294b175d55e8202e53559d083bce0cd /engine/classes/ElggBatch.php
parent38e91f2b8f4972f5b1e0789aeac22056fe8d5c54 (diff)
downloadelgg-574e2eb0df4bc454e847e1974e04c0d85aa661f7.tar.gz
elgg-574e2eb0df4bc454e847e1974e04c0d85aa661f7.tar.bz2
Clearing caches in ElggBatch.
git-svn-id: http://code.elgg.org/elgg/trunk@8226 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/classes/ElggBatch.php')
-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)) {