Made internal attributes/functions private & added getCache method.
For compatibility with the SPL CachingIterator class, the method ->getCache()
was added. Since the cache and the generator are now both exposed via public methods, the internal attributes (and an internal helper method) have been made private.