wood burning stoves 2.0*
The moose likes Servlets and the fly likes What is server side caching? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "What is server side caching?" Watch "What is server side caching?" New topic
Author

What is server side caching?

Perindevi Peramur
Greenhorn

Joined: Dec 24, 2005
Posts: 10
What is server side caching? What are the ways of server side caching? Which is the best when it comes to performance improvement? Setting objects in session comes in which category ?

-Thanks
[ February 22, 2008: Message edited by: perindevi ]
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Server side caching is the act of caching data on the server.
Data can be cached anywhere and at any point on the server that makes sense. It is common to cache commonly used data from the DB to prevent hitting the DB every time the data is required. We cache the results from competition scores since the operation is expensive in terms of both processor and database usage. It is also common to cache pages or page fragments so that they don't need to be generated for every visitor.

There is no 'best', as firstly caching can have down sides such as requiring more memory or always providing slightly old data.

Setting objects on the session is usually done to maintain session state for a user and not for data caching. Caching is typically done for shared data.
Perindevi Peramur
Greenhorn

Joined: Dec 24, 2005
Posts: 10
Hi David,

Thanks so much for your reply.

I also found this link which has a downloadable code which I play to read through now.

http://www.onjava.com/pub/a/onjava/2003/12/23/caching.html?page=1

http://www.servlets.com/soapbox/CacheHttpServlet.java.html

Thanks
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

These articles are very old and don't make use of the latest features. You should check things like OSCache, which can also provide caching of responses.
Perindevi Peramur
Greenhorn

Joined: Dec 24, 2005
Posts: 10
Yes, I did find OSCache to be quite popular when I browsed. I will check it out thanks.
Also, I found this that I found interesting and with some good tips.

http://www.javaperformancetuning.com/news/interview037.shtml

Thanks again.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What is server side caching?
 
Similar Threads
3 tier architecture
NX:Another way of accessing database
Tomcat 6 and catche problem
cache in jsp
How to cache the page on the server side to improve the performance of application "back" button.