Re: Clearing cache selectively on Apache + mod_cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux