This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Performance and the fly likes Why use MemCache for database results caching when hibernate and spring does it all Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Performance
Bookmark "Why use MemCache for database results caching when hibernate and spring does it all" Watch "Why use MemCache for database results caching when hibernate and spring does it all" New topic
Author

Why use MemCache for database results caching when hibernate and spring does it all

Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
I have been arguing this question with myself, Why does anybody need memcache for caching database results when you have hibernate caching or you can enable any other third party cache.

Let me put it this way. Is memcache different type of cache then EHCache or any other open source caches.

Thanks,
Rahul


Rahul Juneja
ThoughtClicks - http://techlabs.thoughtclicks.com
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39569
    
  27
Whatever is used for Hibernate/JPA caching is for DB contents only. Standalone caches can be used for all kinds of data, wherever they originate. In that sense it's not much different from EhCache in standalone mode (outside of JPA). I don't think EhCache can be used by non-Java clients, though.


Ping & DNS - updated with new look and Ping home screen widget
Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Why does anybody need memcache for caching database results when you have hibernate caching or you can enable any other third party cache.


I agree with ulf and how can you expect that every project will be built using technologoes Hibernate Or Spring .


Save India From Corruption - Anna Hazare.
Kees Jan Koster
JavaMonitor Support
Rancher

Joined: Mar 31, 2009
Posts: 251
    
    5
Plus, you can have Hibernate use memcached for caching.


Java-monitor, JVM monitoring made easy <- right here on Java Ranch
Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Thanks guys !
 
Don't get me started about those stupid light bulbs.
 
subject: Why use MemCache for database results caching when hibernate and spring does it all
 
Similar Threads
Caching in Rails application
Is there a default cache?
Doubt in a Hibernate feature
hibernate cache
Pooling vs Instance Caches