• Post Reply Bookmark Topic Watch Topic
  • New Topic

Learning to use cache  RSS feed

 
Udayan Kumar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

Hope this is the right forum for this one.

I have seen a lot of posts about java caching usage but i am not able to see a concrete full fledge example code using any of the open source java caching products available.
What I want to learn is how to implement caching. I want to cache commonly used java objects, collection of objects etc.
The code samples which i saw was very trivial just inserting into the cache. And there are documents which talk about the features but no proper example on how to use the same.
What I wanted to see was how for subsequent user requests the data fetch is done from the cache. Also how to refresh the cache & retire objects from the cache.

If you have any links which describe some code examples do post teh same.



Regards,
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you have a particular caching framework in mind?
 
steve souza
Ranch Hand
Posts: 862
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I googled 'java cache example' and found a number of hits. You could also try keywords like the cache you are researching, and a magazine name like javaworld, and the keyword article. Also look at the forums for the various caches you are interested in using. Here are some that may be helpful though i didn't read them.

http://javaboutique.internet.com/tutorials/docaching/
http://www.informit.com/guides/content.asp?g=java&seqNum=252&rl=1
https://whirlycache.dev.java.net/
 
Udayan Kumar
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Thanks for the response.

We have not finalised on which caching framework to use.
We thought of OS cache but from what we gathered it is more of caching JSP pages & there is a usage of OS cache specific tags in the JSP for the same.

We want to cache static (master) data which will not change at all or even if it changes it will be very less frequent.
So we have to cache such data (collections) to be used in drop down list etc.

Regards
 
jad yuuu
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
If you can describe us what you need, i.e. if you need to set a fixed size for the cache, if you want to have a pointer to the entries being dumped etc....
I think i can help.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!