httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karim Zaki <Karim.Z...@itworx.com>
Subject [users@httpd] RE: Clearing cache selectively on Apache + mod_cache
Date Mon, 01 Dec 2008 10:35:39 GMT
Why do you think using request headers would not work?

From: Tamer Embaby [mailto:Tamer.Embaby@itworx.com]
Sent: Monday, December 01, 2008 1:39 AM
To: users@httpd.apache.org
Subject: [users@httpd] RE: Clearing cache selectively on Apache + mod_cache

Karim,

I'm afraid you have to do that programmatically.  We've done that in a
project before with Apache 2.0 by knowing how Apache encodes
URL for storing in internal cache directories, read it from:
modules/cache_util.c:
          cache_hash(...)

Which is controlled using:
      CacheDirLevels XX
      CacheDirLength YY
Apache directives.

I believe you will write your own code that hashes the target URL like
Apache does, and delete that file from the cache, call that code
whenever you need to content is updated.

And I don't think that would change for 2.2.X Apache, the addition of
"htcacheclean" doesn't help in your case either.

P.S. Look for Hossam Karim if you need the Java code, he is the one
who did that.

Regards,
Tamer

________________________________
From: Karim Zaki [mailto:Karim.Zaki@itworx.com]
Sent: Sunday, November 30, 2008 4:59 PM
To: users@httpd.apache.org
Subject: [users@httpd] Clearing cache selectively on Apache + mod_cache

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?

Thanks,
Karim

-------------------------------------------------------------------------------
"Although the moon is smaller than the earth, it is farther away."


Mime
View raw message