These can be useful eg. in order to assert that IndexSearcher is using the expected cache.
Commit 1708839 from Adrien Grand in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1708839 ]
LUCENE-6838: Added getters for IndexSearcher's query cache and caching policy.
Commit 1708832 from Adrien Grand in branch 'dev/trunk'
[ https://svn.apache.org/r1708832 ]
looks good +1
Here is a patch.