adding lru caching to WordIndex