I have a Drupal website running on Httpd that makes AJAX calls to fetch fragments of HTML that are served up by JSPs in Tomcat 6 running on a different virtual host. Integration between the two servers is via Jkmod.

When data in the Java backend changes, the HTML served by the JSPs changes to reflect the new data. Unfortunately it often takes more than an hour for changes to be reflected on the Drupal site. It's not a local browser caching thing, as we've looked at the site from different machines with the same results, and also using Firebug to disable browser caching.

A specific scenario:

Last night the Tomcat app was switched off, causing the Drupal pages which make AJAX calls to display errors. When the Tomcat app was started up again, the pages that the users hadn't visited while the server was off were displayed with the correct HTML from Tomcat. The pages that had been visited were still displaying the error. Visiting those same JSPs directly (ie without going through Httpd) was fine. The final solution was to make an invisible change to the Drupal page, and after that the error disappeared and the JSP content was displayed correctly. Again, normally this would take an hour or two before correcting itself without the page changes.

I don't know Httpd or Drupal well so I'm not sure where this weird caching would be configured. Running Httpd 2.2, Drupal 6.17 and Tomcat 6.0.29

  • I don't think apache is capable of caching dynamic web in a way that makes sense (ie, create keys based on part of URI, on cookies etc). – 3molo Nov 4 '10 at 8:33

Drupal has its own caching built in. Login to your site drupal admin portal. usually domain.com/user and then navigate over to site configuration/cache exclusions from here you can exclude certain pages from being cached.

  • This turned out right, clearing the cache gets me what I want :) I'd +1 your answer if I had the rep :/ – iftheshoefritz Nov 14 '10 at 15:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.