httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karim Zaki <Karim.Z...@itworx.com>
Subject RE: [users@httpd] Clearing cache selectively on Apache + mod_cache
Date Mon, 01 Dec 2008 11:08:20 GMT
But that would be like re-implementing mod_cache, wouldn't it? Apache is already doing this
for me. It's caching the dynamic content, keeping it for 24 hours, and checking if it's in
cache before requesting it from the back-end server. The only problem is that I need to sometimes
clear certain pages from cache.

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com]
Sent: Monday, December 01, 2008 1:00 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Clearing cache selectively on Apache + mod_cache

Karim Zaki wrote:
> Greetings all,
>
> I'm running Apache/2.2.10 (Win32) mod_jk/1.2.27 + mod_cache. I'm looking for a way to
clear the cache from Apache for specific URLs. I'm using Apache to cache dynamic content that
is served by Tomcat, and I would like to keep the content (age) high (e.g. 24 hours) but still
to be able to clear the cache for specific pages when the content is updated. Is there a way
to tell Apache to clear the cache for a specific list of URLs?
>
Hi.
I am not going to answer your original question, but I just have a
couple of remarks based on your description above, and maybe a different
way of thinking about this.

You say that you want to cache dynamic content generated by Tomcat, for
24 hours.
In other words, it is not really dynamic content, because for 24 hours
your users are going to get the same unique version.

If so, then why would you not generate these pages in advance, and put
them somewhere on your Apache server to be served as static content ?
Then each 24 hours you can do the same and refresh them from Tomcat.
(This would be fairly simple to do using a script, calling something
like wget or curl, or in perl using LWP).

I believe it is fairly simple to configure your Apache in such a way
that it will look first of this URL is available as a static page, and
if not forward the call to Tomcat.
(using mod_rewrite e.g.).


---------------------------------------------------------------------
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


---------------------------------------------------------------------
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


Mime
View raw message