IntelliJ open source
[Logo] JavaRanch » JavaRanch Saloon
  Search | FAQ | Recent Topics | Hot Topics
Register / Login


Win a copy of Flex 4 in Action this week in the Flex forum!
Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Performance
 
RSS feed
 
New topic
Author

Using Data Cahe mechanism in Applications

Ravi Kiran V
Ranch Hand

Joined: Apr 18, 2009
Messages: 1200

Hi

It is said that Data Caching mechanism increases the performance , as Databates hits will be less and Data will be retreivied from the cache .
So generally there are number of 3rd party cache mechanisms available for this .


But please tell me generally what type of Objects will be generally cached ??Can anybody please give me a scenario.


I tried to change the world, but I couldn’t find the source code
Jeanne Boyarsky
internet detective
Sheriff

Joined: May 26, 2003
Messages: 17170

Depends on your application. For example, maybe this site would cache the list of forums.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]

"The set strikes me as something like the set of potatoes, radishes, farming, and lunch. " - a colleague's way of comparing both overlapping and disparate groups. made me laugh and thought of the ranch
Velu Kasirajah
Greenhorn

Joined: Feb 06, 2010
Messages: 15

Static look up data are usually good candidates for caching. For instance, the list of options used by your web pages or any such static data. Apps typically load and cache them at the beginning or when they are needed for the first time (lazy loading). Complex objects that are expensive to create are also cached (typically lazy loading). Hope that helps.

Velu Kasirajah

Velu Kasirajah
Ravi Kiran V
Ranch Hand

Joined: Apr 18, 2009
Messages: 1200

For instance, the list of options used by your web pages


You mean Kepping hyperlink data as to maintain cache ??



I tried to change the world, but I couldn’t find the source code
Kees Jan Koster
Ranch Hand

Joined: Mar 31, 2009
Messages: 148

Dear Ravi,

What actual performance problem are you resolving with caching?

Kees Jan

Java-monitor, JVM monitoring made easy (and free)
Ravi Kiran V
Ranch Hand

Joined: Apr 18, 2009
Messages: 1200

Hi

Thank you all for your suppourt .

I have now realised that i dont have any frequently accessed data , so i decided not to use the Second Level cache (Hibernate in my case )




I tried to change the world, but I couldn’t find the source code
Wouter Oet
Ranch Hand

Joined: Oct 25, 2008
Messages: 494

A nice quote from Donald Knuth, just keep that in mind
"We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil"

"Any fool can write code that a computer can understand.
Good programmers write code that humans can understand." --- Martin Fowler
 
 
 
Reply Bookmark it! Watch this topic JavaRanch » Forums » Java » Performance
 
RSS feed
 
New topic
The most intelligent Java IDE