We are working design of new project where we need to decided framework for caching. We are looking at ehcache and lucene for caching. We need decide whether to use lucene or ehcache for our caching requirement? What are advantage/disadvantage of using ehcache or lucene for caching?
Well, ehcache is a caching implementation Lucene is an IR tool, so they are impossible to compare with each other because they do different things. However, if its caching you want, I would recommend going for the one that offers caching and not the one that doesn't.
Lucene isn't a caching solution per se - it's an API for implementing search applications. It's fast, but most likely not faster than a "proper" cache implementation (like ehcache). Or are you asking about using it in-memory via RAMDirectory or InstantiatedIndex?