Skip to content

Commit e7cf910

Browse files
author
Igor V. Gulyaev
committed
* requested indexes in result instead of watermarked
1 parent 554b118 commit e7cf910

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

core/Cache/WatermarkedPeer.class.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,18 @@ public function decrement($key, $value)
110110

111111
public function getList($indexes)
112112
{
113-
foreach ($indexes as &$index)
114-
$index = $this->getActualWatermark().$index;
115-
116-
return $this->peer->getList($indexes);
113+
$peerIndexMap = array();
114+
foreach ($indexes as $index)
115+
$peerIndexMap[$this->getActualWatermark().$index] = $index;
116+
117+
$peerResult = $this->peer->getList(array_keys($peerIndexMap));
118+
119+
$result = array();
120+
foreach ($peerResult as $key => $value) {
121+
$result[$peerIndexMap[$key]] = $value;
122+
}
123+
124+
return $result;
117125
}
118126

119127
public function get($key)

0 commit comments

Comments
 (0)