Code Duplication    Length = 4-6 lines in 2 locations

engine/classes/Elgg/Database.php 2 locations

@@ 340-345 (lines=6) @@
337
		$hash = md5($query_id);
338
339
		// Is cached?
340
		if ($this->queryCache) {
341
			if (isset($this->queryCache[$hash])) {
342
				$this->logger->log("DB query $query results returned from cache (hash: $hash)", \Elgg\Logger::INFO);
343
				return $this->queryCache[$hash];
344
			}
345
		}
346
347
		$dblink = $this->getLink('read');
348
		$return = array();
@@ 370-373 (lines=4) @@
367
		}
368
369
		// Cache result
370
		if ($this->queryCache) {
371
			$this->queryCache[$hash] = $return;
372
			$this->logger->log("DB query $query results cached (hash: $hash)", \Elgg\Logger::INFO);
373
		}
374
375
		return $return;
376
	}