PHP memoizing iterator which inherits SPL CachingIterator