Ehcache has different types of storage. If you refer to the most commonly used one (MemoryStore
), it uses SelectableConcurrentHashMap
which is a somewhat customized version of ConcurrentHashMap
. Just to be clear, this is completely different from how Lucene works.
If you want to Lucene-index your cache entries, one of the ways of doing that would be implementing CacheEventListener
and calling relevant Lucene APIs on each cache event (remove, put, expired, etc.).