You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Eric Covener <co...@gmail.com> on 2008/12/01 01:19:09 UTC

Re: [users@httpd] Clearing cache selectively on Apache + mod_cache

On Sun, Nov 30, 2008 at 9:59 AM, Karim Zaki <Ka...@itworx.com> 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?
>

Try these combinations of headers, comment from cache_util.c:

    /*
     * We now want to check if our cached data is still fresh. This depends
     * on a few things, in this order:
     *
     * - RFC2616 14.9.4 End to end reload, Cache-Control: no-cache. no-cache in
     * either the request or the cached response means that we must
     * revalidate the request unconditionally, overriding any expiration
     * mechanism. It's equivalent to max-age=0,must-revalidate.
     *



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


RE: [users@httpd] Clearing cache selectively on Apache + mod_cache

Posted by Karim Zaki <Ka...@itworx.com>.
That sounds like a possible way to go. However, this spills into another question. I have the CacheIgnoreCacheControl directive set to "On" for mod_cache. I know that this means "no-cache" is ignored in the request. Does it also ignore "max-age", or can I force the cache to clear by using "max-age" even if CacheIgnoreCacheControl is on?

Thanks,

-----Original Message-----
From: Eric Covener [mailto:covener@gmail.com]
Sent: Monday, December 01, 2008 2:19 AM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Clearing cache selectively on Apache + mod_cache

On Sun, Nov 30, 2008 at 9:59 AM, Karim Zaki <Ka...@itworx.com> 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?
>

Try these combinations of headers, comment from cache_util.c:

    /*
     * We now want to check if our cached data is still fresh. This depends
     * on a few things, in this order:
     *
     * - RFC2616 14.9.4 End to end reload, Cache-Control: no-cache. no-cache in
     * either the request or the cached response means that we must
     * revalidate the request unconditionally, overriding any expiration
     * mechanism. It's equivalent to max-age=0,must-revalidate.
     *



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


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