Pregunta

I just went to almost all the documentation of ehcache. They are using indexes to perform queries in cache. What they didn't mentioned is what technique they are using?

Also I want to use EHcache as a cache store and create index on that cache with lucene. Does anyone know how to do that i already did an exhaustive search but didn't find anything is it even possible to with EHcache?

¿Fue útil?

Solución

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.).

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top