httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Montague <>
Subject Re: [users@httpd] Caching webservice calls using apache
Date Tue, 10 Apr 2012 12:26:25 GMT
On April 10, 2012 4:31 , aparna Puram <> wrote:
> Currently we have only a tomcat installed and all are directly 
> accessing the tomcat via apache, And all the webserivice calls are 
> directly being called from tomcat and this inturn is increasing the 
> load on the tomcat server.
> Is there a way to cache these websercice calls using apache.
> If so kindly provide me the details or please let me know the reasons 
> for not being cached.

Apache HTTP Server can certainly cache content, see   Be sure to read the 
sections "What Can be Cached?" and "What Should not be Cached?"

However, caching for a web service call only makes sense if the call 
will always return the same output for a given set of 
arguments/parameters and the call does not have any side effects.  For 
example, it would be safe to cache the results of call for "return a 
thumbnail of the image a.png" but it would not be safe to cache the 
results of a call for "add a new description for part number 12345".

Also note that web service calls using the HTTP POST method may be 
difficult or impossible to cache.

Often, caching is used only for static content, as it can be tricky -- 
or inappropriate -- to correctly set up caching for dynamically 
generated content.

Instead of caching web service calls, you may want to analyze how Tomcat 
is spending its time and see if the code of your web application can be 
made more efficient.

   Mark Montague

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message