• Post Reply Bookmark Topic Watch Topic
  • New Topic

Caching Read Only Data  RSS feed

 
Romario Dominic
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
What are the best strategies to cache Read Only Data in Java?

Thanks in advance.
 
Bimal Patel
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

All it depends on what you want to cache. Are you going to read from DB? If yes, you can use some OR mapping tool or create your own mechanism for caching data on a specific query.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no one best strategy for which "read-only data" is the sole criteria. Can you offer anything more specific?
 
Manuel Palacio
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use a general purpose cache and avoid reinventing the wheel if you can. Check out EHCache. It has different storage options and it also integrates with Hibernate. Might meet your needs.

http://ehcache.sourceforge.net/


If you need something more advanced check Coherence or JBossCache.

/Manuel
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a caching proposal JSR-107 that has this interest group at Sun
The whirlycache project also looks interesting.

Bill
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!