# The CachingIterator class

&reftitle.intro;

This object supports cached iteration over another iterator.

&reftitle.classsynopsis;

         CachingIterator

         extends
         IteratorIterator

         implements
         ArrayAccess

         Countable

         Stringable

        &Constants;

         public
         const
         int
         CachingIterator::CALL_TOSTRING

         public
         const
         int
         CachingIterator::CATCH_GET_CHILD

         public
         const
         int
         CachingIterator::TOSTRING_USE_KEY

         public
         const
         int
         CachingIterator::TOSTRING_USE_CURRENT

         public
         const
         int
         CachingIterator::TOSTRING_USE_INNER

         public
         const
         int
         CachingIterator::FULL_CACHE

        &Methods;

        &InheritedMethods;

&reftitle.constants;

`CachingIterator::CALL_TOSTRING`

- Convert every element to string.

`CachingIterator::CATCH_GET_CHILD`

- Don't throw exception in accessing children.

`CachingIterator::TOSTRING_USE_KEY`

- Use key for conversion to string.

`CachingIterator::TOSTRING_USE_CURRENT`

- Use current for conversion to string.

`CachingIterator::TOSTRING_USE_INNER`

- Use inner for conversion to string.

`CachingIterator::FULL_CACHE`

- Cache all read data.

&reftitle.changelog;

&Version; | &Description;
8.0.0 | `CachingIterator` implements Stringable now.

&reference.spl.entities.cachingiterator;