Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@locus.apache.org Received: (qmail 43114 invoked from network); 6 Mar 2007 22:41:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Mar 2007 22:41:55 -0000 Received: (qmail 84696 invoked by uid 500); 6 Mar 2007 22:42:03 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 84677 invoked by uid 500); 6 Mar 2007 22:42:03 -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 84668 invoked by uid 99); 6 Mar 2007 22:42:03 -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 14:42:03 -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 [142.103.6.52] (HELO smtp.cs.ubc.ca) (142.103.6.52) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Mar 2007 14:41:51 -0800 Received: from [128.189.246.64] ([128.189.246.64]) (authenticated bits=0) by smtp.cs.ubc.ca (8.13.7/8.13.6) with ESMTP id l26MfSfM019151 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 6 Mar 2007 14:41:30 -0800 Message-ID: <45EDEE18.5020004@cs.ubc.ca> Date: Tue, 06 Mar 2007 14:41:28 -0800 From: Erica Zhang User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.13) Gecko/20060414 X-Accept-Language: en-us, en MIME-Version: 1.0 To: modules-dev@httpd.apache.org Subject: Re: Questions on modules to provide cache functions for Apache References: <45ED0FE0.7050907@cs.ubc.ca> <1173209753.4110.5.camel@test.asus> <45EDC442.2060300@cs.ubc.ca> <5280fae50703061212n699ad196qfd722566d067b713@mail.gmail.com> <45EDD561.9080802@cs.ubc.ca> In-Reply-To: <45EDD561.9080802@cs.ubc.ca> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I use live http headers to catch the headers. I listed them below. Well I found that php file has not been given the http headers. So is this the problem for not caching the response produced by it ? Then how can I handle this problem ? Also, is there some mod_cache log that I could refer ? Thanks. http://128.189.246.64/gethint.php?q=Eric&sid=0.11837499670287688 GET /gethint.php?q=Eric&sid=0.11837499670287688 HTTP/1.1 Host: 128.189.246.64 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.2) Gecko/20070219 Firefox/2.0.0.2 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Referer: http://128.189.246.64/ HTTP/1.x 200 OK Date: Tue, 06 Mar 2007 22:35:34 GMT Server: Apache/2.0.59 (Win32) X-Powered-By: PHP/4.4.4 Cache-Control: public Last-Modified: Tue, 06 Mar 2007 22:35:34 GMT Keep-Alive: timeout=15, max=10000 Connection: Keep-Alive Transfer-Encoding: chunked Content-Type: text/html Erica Zhang wrote: > Well, even I use the blinding-cache. It still could not work. Thanks, > > Erica > > David Wortham wrote: > >> Erica, >> I'm not sure why mod_cache should not be able to work (assuming your >> module and pages are configured correctly). >> >> IIRC, JavaScript is used on the presentation request (with the >> webpage), >> whereas the XMLHttpRequest response is a PHP-generated XML document. >> Perhaps your extension ('.php" maybe?) or the mime/content-type >> ("text/xml") >> is what is causing mod_cache to skip the file? >> >> Also, from what I can gather, using mod_cache with mod_proxy (as a >> caching proxy) can alter the effects of mod_cache slightly. You may >> want to >> read up on that. >> >> Try using the following directive with mod_cache: >> CacheIgnoreNoLastMod On >> >> see: >> http://webauth.stanford.edu/manual/mod/mod_cache.html#CacheIgnoreNoLastMod >> >> >> This apparently forces blind-caching which Joe suggests is bad (I >> don't know >> anything about it). Short of that, you just need to read the mod_cache >> manual and make sure your XML response contains the necessary headers >> to get >> mod_cache to work correctly. >> >> Regards, >> Dave >> >> >> >> On 3/6/07, 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. >>> >>> >>> Erica >>> >>> Joachim Zobel wrote: >>> >>> >Am Montag, den 05.03.2007, 22:53 -0800 schrieb Erica Zhang: >>> > >>> > >>> >>header("Cache-Control: public"); // HTTP/1.1 >>> >>header("Expires: " .gmdate ("D, d M Y H:i:s", time() + 60 * 10). " >>> GMT"); >>> >>header( "Last-Modified: " .gmdate( 'D, d M Y H:i:s' ). " GMT" ); >>> >>echo $response; >>> >> >>> >> >>> > >>> >I am not shure about mod_caches behaviour, but omitting >>> last-modified is >>> >worth a try. >>> > >>> >Sincerely, >>> >Joachim >>> > >>> > >>> > >>> >>> >>