Hi @usmanm 

This line is useless because of the thread locality of cache. It only removes the entry for the calling thread which is in this case the thread closing the index. This is not a searching thread which is typically what uses this cache. On top of that, it will only remove an entry for a single thread not of all threads with data in the cache (as you'd want).

I will be closing this pull request as kimchy indeed pushed a better solution - the use of ClosableThreadLocal means things will cleared faster than in my proposed solution.

Cheers,
Boaz