• Post Reply Bookmark Topic Watch Topic
  • New Topic

cache  RSS feed

 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello:

What are the data structures(TreeSet, LinkedList, HashMap...) we'd better to use when implement the cache? Which one is the best? Any consideration behind the choice? Any good website and code on cache?

Thanks a lot!
 
sarah Marsh
Ranch Hand
Posts: 282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
any input on this?
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at the Sun Tutorial: Collections for details on how these all differ, and how you might choose one for the job.

How would a client class use the cache? Can you define it by what it must do? These method signatures aren't quite right ... what do you think they should be?
 
Joe Boxer
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why bother implementing?
Take a look on 3rd party open source projects. I am happy with ehCache at the moment.

Joe
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66264
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Joe Boxer",

There aren't many rules that you need to worry about here on the Ranch, but one that we take very seriously regards the use of proper names. Please take a look at the JavaRanch Naming Policy and adjust your display name to match it.

In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious.

Thanks!
bear
JavaRanch Sheriff
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!