Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
Kees Jan Koster
JavaMonitor Support
Rancher
Posts: 251
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Plus, you can have Hibernate use memcached for caching.
 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys !
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic