From modules-dev-return-401-apmail-httpd-modules-dev-archive=httpd.apache.org@httpd.apache.org Tue Mar 06 20:05:28 2007 Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 85419 invoked from network); 6 Mar 2007 20:05:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2007 20:05:27 -0000 Received: (qmail 61816 invoked by uid 500); 6 Mar 2007 20:05:35 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 61796 invoked by uid 500); 6 Mar 2007 20:05:35 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 61787 invoked by uid 99); 6 Mar 2007 20:05:35 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 12:05:35 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [166.70.186.42] (HELO onyx.sharktooth.org) (166.70.186.42) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 12:05:23 -0800 Received: from jlewis4.provo.novell.com ([137.65.62.53]) by onyx.sharktooth.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.63 (FreeBSD)) (envelope-from ) id 1HOfn8-000Cy6-5o for modules-dev@httpd.apache.org; Tue, 06 Mar 2007 12:57:51 -0700 Message-ID: <45EDC96A.3070108@joe-lewis.com> Date: Tue, 06 Mar 2007 13:04:58 -0700 From: Joe Lewis User-Agent: Thunderbird 1.5.0.4 (X11/20060516) MIME-Version: 1.0 To: modules-dev@httpd.apache.org References: <45ED0FE0.7050907@cs.ubc.ca> <1173209753.4110.5.camel@test.asus> <45EDC442.2060300@cs.ubc.ca> In-Reply-To: <45EDC442.2060300@cs.ubc.ca> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 137.65.62.53 X-SA-Exim-Mail-From: joe@joe-lewis.com X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on onyx.sharktooth.org X-Spam-Level: Subject: Re: Questions on modules to provide cache functions for Apache X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on onyx.sharktooth.org) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.7 Erica Zhang wrote: > No, still not work. Infact, mod_cache could work, because it could > cache the javascript. But it could not work for dynamic HTTP responses > responding to XMLHttpRequests in Ajax technology. So I suspect > mod_cache could not support this function. And I need provide such > function by myself. I prefer to do it in Apache, a comparatively > general way instead of application itself. The reason it does not cache the dynamic responses is because those headers (Expires, Cache-Control and Last-Modifed) do NOT exist with that content. In that situation again, you have two options : a) modify the generator (the java class generating the XML data) to supply a last-modifed header. b) blind cache it - again causing discrepancies in data at the browser and data supplied by the server. It is always suggested that, if the data is to be cached, the generator needs to submit the appropriate caching headers. If the headers are not submitted by the generator and something does cache it without checking for updates at the server, don't expect "up-to-date" hits on this dynamic data from a browsers' perspective - it simply cannot happen. Joe -- Joseph Lewis "Divide the fire, and you will sooner put it out." - Publius Syrus