File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EhCache and the fly likes ehcache and lucene comparison Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Caching » EhCache
Bookmark "ehcache and lucene comparison" Watch "ehcache and lucene comparison" New topic

ehcache and lucene comparison

Maulin Rathod

Joined: Dec 17, 2008
Posts: 11
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?
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

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.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Lester Burnham

Joined: Oct 14, 2008
Posts: 1337
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?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960

As far as I know, ehcache can be used as backing for Lucene. So it's not necessarily "either/or".

Customer surveys are for companies who didn't pay proper attention to begin with.
Lester Burnham

Joined: Oct 14, 2008
Posts: 1337
Please BeForthrightWhenCrossPostingToOtherSites:
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: ehcache and lucene comparison
Similar Threads
JSP caching with Apache web server
Remote caching using ehcache
Hibernate Caching
Hibernate Second level Cache
How to start a daemon thread at application startup in a Spring application