elasticsearch/elasticsearch — pull request #8289 by dakrone (2014-10-30 13:01:20+00:00)
Title: Immediately removed filter cache entries on cache clear

Previously we had a more complex listing where we added each reader key to the list of keys cleaned intermittently by `IndicesFilterCache.ReaderCleaner.run()`, but because every entry is being invalidated due to the cache clear, we should immediately clear them and clean up the cache.

This also moves the periodic cleaning rescheduling into a finally block so an exception does not prevent the cleanup from being rescheduled.

Fixes #8285