Implemented caching for field indexes to improve performance.