-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: None
CachingIterator currently caches items in a PHP array using the original keys from the wrapped Traversable. If the Traversable has any duplicate keys, CachingIterator is prone to overwriting cached elements and returning an incorrect count.
We should be able to fix this by changing the cache into a list of key/value tuples.
Note that this is not a problem for MongoDB cursors, since PHPC uses sequential integers for its cursor keys.