add caching to indexes