You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Shibi NS <sh...@gmail.com> on 2009/08/11 11:25:59 UTC
[users@httpd] mod_cache not working
I have the following configuration in my httpd.conf
LoadModule cache_module modules/mod_cache.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule perl_module modules/mod_perl.so
CacheEnable disk /specs/
CacheRoot /data/cache/
SetEnvIfNoCase request_uri \.html$ gzip cache-enable=disk
<Files ~ "\.html$">
SetOutputFilter DEFLATE
SetHandler perl-script
PerlResponseHandler MyApp::HtmlHandler::handler
</Files>
Where MyApp::HtmlHandler::handler converts an xml file to html if it not
exits else serve the existing html file . But I don't see file is getting
cached when try accessing http://<myserevr>:<myport>/specs/Template.html
Any clues? , I am missing some con-fig steps ?
--Shibi Ns--
Re: [users@httpd] mod_cache not working
Posted by Shibi NS <sh...@gmail.com>.
Thanks That helped me to find out the issue . The issue was Cache-Control
header was not set
<Files ~ "\.html$">
Header set Cache-Control "max-age=60, public"
SetHandler perl-script
PerlResponseHandler MyApp::HtmlHandler::handler
</Files>
But now I get this in debug log, seems like its caching each time
Cached response for /specs/Template.html isn't fresh. Adding/replacing
conditional request head
Shibi Ns
On Tue, Aug 11, 2009 at 4:46 PM, Eric Covener <co...@gmail.com> wrote:
> On Tue, Aug 11, 2009 at 5:25 AM, Shibi NS<sh...@gmail.com> wrote:
> >
> > I have the following configuration in my httpd.conf
> >
> > LoadModule cache_module modules/mod_cache.so
> > LoadModule disk_cache_module modules/mod_disk_cache.so
> > LoadModule perl_module modules/mod_perl.so
> >
> > CacheEnable disk /specs/
> > CacheRoot /data/cache/
> > SetEnvIfNoCase request_uri \.html$ gzip cache-enable=disk
> >
> > <Files ~ "\.html$">
> > SetOutputFilter DEFLATE
> > SetHandler perl-script
> > PerlResponseHandler MyApp::HtmlHandler::handler
> > </Files>
> >
> > Where MyApp::HtmlHandler::handler converts an xml file to html if it not
> > exits else serve the existing html file . But I don't see file is getting
> > cached when try accessing http://<myserevr>:<myport>/specs/Template.html
> >
> >
> > Any clues? , I am missing some con-fig steps ?
>
> LogLevel debug might tell you why it's not cached.
>
> --
> Eric Covener
> covener@gmail.com
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
>
--
--Shibi Ns--
Re: [users@httpd] mod_cache not working
Posted by Eric Covener <co...@gmail.com>.
On Tue, Aug 11, 2009 at 5:25 AM, Shibi NS<sh...@gmail.com> wrote:
>
> I have the following configuration in my httpd.conf
>
> LoadModule cache_module modules/mod_cache.so
> LoadModule disk_cache_module modules/mod_disk_cache.so
> LoadModule perl_module modules/mod_perl.so
>
> CacheEnable disk /specs/
> CacheRoot /data/cache/
> SetEnvIfNoCase request_uri \.html$ gzip cache-enable=disk
>
> <Files ~ "\.html$">
> SetOutputFilter DEFLATE
> SetHandler perl-script
> PerlResponseHandler MyApp::HtmlHandler::handler
> </Files>
>
> Where MyApp::HtmlHandler::handler converts an xml file to html if it not
> exits else serve the existing html file . But I don't see file is getting
> cached when try accessing http://<myserevr>:<myport>/specs/Template.html
>
>
> Any clues? , I am missing some con-fig steps ?
LogLevel debug might tell you why it's not cached.
--
Eric Covener
covener@gmail.com
---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org