package test.classCache; |
Java2html |
Caching Java Objects.
Caching Java Objects for faster retrieval needs just two things, override the hashCode method and equals method of the class’s object to be cached. Things that I would consider while overriding the hashCode is a) to use the fields that make the unique key and b) avoid String fields as much as possible. This example illustrates the same.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment