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
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: 17417

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

An IDE is no substitute for an Intelligent Developer.
Lester Burnham

Joined: Oct 14, 2008
Posts: 1337
Please BeForthrightWhenCrossPostingToOtherSites:
I agree. Here's the link:
subject: ehcache and lucene comparison
jQuery in Action, 3rd edition