Re: mod_cache: Broken Expires from back end and CacheStoreExpired

2018-06-19 Thread Jim Jagielski
I can't fault the logic... +1 for the patch. > On Jun 19, 2018, at 6:47 AM, Rainer Jung wrote: > > I have a situation where I have a caching Apache in front of a back end. The > backend sends a response header "Expires: -1" and mod_cache unconditionally > refu

mod_cache: Broken Expires from back end and CacheStoreExpired

2018-06-19 Thread Rainer Jung
I have a situation where I have a caching Apache in front of a back end. The backend sends a response header "Expires: -1" and mod_cache unconditionally refuses to cache the response with the error "Broken expires header". RFC 7234 section 5.3 [

Re: Redis and mod_cache/mod_socache

2016-11-02 Thread William A Rowe Jr
On Mon, Oct 31, 2016 at 10:49 AM, Graham Leggett wrote: > On 31 Oct 2016, at 5:05 PM, Jim Jagielski wrote: > > > Moving to APR: > > > > Query: Think it would be worth my time to work on a Redis > > implementation for APR-util? I am working on a minimal Redis

Re: Redis and mod_cache/mod_socache

2016-11-02 Thread Jim Jagielski
r 2016 at 14:30, Jim Jagielski <j...@jagunet.com> wrote: >> Query: Think it would be worth my time to work on a >> Redis implementation for mod_cache/mod_socache? I am >> working on a minimal Redis lib, related to work, which >> is basically a soft reboot of Credis from Go

Re: Redis and mod_cache/mod_socache

2016-11-02 Thread Mario Brandt
plementation for mod_cache/mod_socache? I am > working on a minimal Redis lib, related to work, which > is basically a soft reboot of Credis from GoogleCode, > which could serve as the core functionality, which is > what got me thinking about it.

Re: Redis and mod_cache/mod_socache

2016-10-31 Thread Jim Jagielski
The current work-in-progress, not yet APR-ized is at: https://github.com/jimjag/credis > On Oct 31, 2016, at 11:49 AM, Graham Leggett wrote: > > On 31 Oct 2016, at 5:05 PM, Jim Jagielski wrote: > >> Moving to APR: >> >> Query: Think it would be worth

Re: Redis and mod_cache/mod_socache

2016-10-31 Thread Graham Leggett
On 31 Oct 2016, at 5:05 PM, Jim Jagielski wrote: > Moving to APR: > > Query: Think it would be worth my time to work on a Redis > implementation for APR-util? I am working on a minimal Redis > lib, related to work, which is basically a soft reboot of Credis > from GoogleCode,

Re: Redis and mod_cache/mod_socache

2016-10-31 Thread Jim Jagielski
Moving to APR: Query: Think it would be worth my time to work on a Redis implementation for APR-util? I am working on a minimal Redis lib, related to work, which is basically a soft reboot of Credis from GoogleCode, which could serve as the core functionality, which is what got me thinking about

Re: Redis and mod_cache/mod_socache

2016-10-31 Thread Graham Leggett
On 31 Oct 2016, at 4:13 PM, Ruediger Pluem wrote: > Which creates the generic question for me: Can't we setup APR in a way that > for certain aspects we could compile > "drivers" against an existing APR whose code exists outside of APR first and > gets part of standard APR

Re: Redis and mod_cache/mod_socache

2016-10-31 Thread Graham Leggett
On 31 Oct 2016, at 3:43 PM, Jim Jagielski wrote: > It would, but that would mean even more of a APR dependency > and a wait until the next release of APR and etc, etc, etc... > Basically, APR moves too slow for httpd. APR can make a release at any time. It usually doesn’t

Re: Redis and mod_cache/mod_socache

2016-10-31 Thread Ruediger Pluem
<j...@jagunet.com> wrote: >> >>> Query: Think it would be worth my time to work on a >>> Redis implementation for mod_cache/mod_socache? I am >>> working on a minimal Redis lib, related to work, which >>> is basically a soft reboot of Credis from Google

Re: Redis and mod_cache/mod_socache

2016-10-31 Thread Jim Jagielski
im Jagielski <j...@jagunet.com> wrote: > >> Query: Think it would be worth my time to work on a >> Redis implementation for mod_cache/mod_socache? I am >> working on a minimal Redis lib, related to work, which >> is basically a soft reboot of Credis from GoogleCode, >&

Re: Redis and mod_cache/mod_socache

2016-10-31 Thread Graham Leggett
On 31 Oct 2016, at 3:30 PM, Jim Jagielski <j...@jagunet.com> wrote: > Query: Think it would be worth my time to work on a > Redis implementation for mod_cache/mod_socache? I am > working on a minimal Redis lib, related to work, which > is basically a soft reboot of Credis from G

Redis and mod_cache/mod_socache

2016-10-31 Thread Jim Jagielski
Query: Think it would be worth my time to work on a Redis implementation for mod_cache/mod_socache? I am working on a minimal Redis lib, related to work, which is basically a soft reboot of Credis from GoogleCode, which could serve as the core functionality, which is what got me thinking about it.

Re: mod_cache forgets to include cached headers when serving cached content under certain circumstances (2.2.x)

2016-05-23 Thread Eric Covener
On Mon, May 23, 2016 at 6:24 AM, Rob Landrito <rlandr...@gmail.com> wrote: > The specific circumstance is described in a comment in mod_cache: > > /* Hold the phone. Some servers might allow us to cache a 2xx, but > * then make their 304 responses non cacheab

mod_cache forgets to include cached headers when serving cached content under certain circumstances (2.2.x)

2016-05-23 Thread Rob Landrito
the appropriate headers. This can result in errors on the client side as content encoding and content type information is lost. The specific circumstance is described in a comment in mod_cache: /* Hold the phone. Some servers might allow us to cache a 2xx, but * then make their 304 responses non

Re: mod_cache: Broken code?

2015-12-07 Thread Eric Covener
On Fri, Apr 24, 2015 at 2:04 AM, Niklas Edmundsson wrote: > > When trying to debug something else I stumbled across this code-snippet in > modules/cache/mod_cache.c: > > errno = 0; > x = control.max_age_value; > if (errno) { > x = dconf->defex; > } > else { > x = x *

mod_cache: Broken code?

2015-04-24 Thread Niklas Edmundsson
When trying to debug something else I stumbled across this code-snippet in modules/cache/mod_cache.c: errno = 0; x = control.max_age_value; if (errno) { x = dconf-defex; } else { x = x * MSEC_ONE_SEC; } It looks that way both in trunk and 2.4.x. The likelhood of that if-statement to

mod_cache/mod_mem_cache questions

2014-08-30 Thread Eric Covener
In mod_mem_cache, the remove_url() callback and remove_entity() callback have a few differences that I don't really understand. * why does only one lookup the object in the cache before removing it * why does only one call cleanup_cache_object? I have seen crashes in remove_url w/ CacheLock used

Re: [RFC] enhancement: mod_cache bypass

2014-08-24 Thread Mark Montague
If sections have a better chance of being accepted than one that adds a expr= clause to the CacheEnable directive? Or should mod_cache not allow cache bypassing at all? Use NGINX ( http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_bypass ) if you want that or use Varnish

Re: [RFC] enhancement: mod_cache bypass

2014-08-23 Thread Graham Leggett
On 23 Aug 2014, at 03:50, Mark Montague m...@catseye.org wrote: I've attached a proof-of-concept patch against httpd 2.4.10 that allows mod_cache to be bypassed under conditions specified in the conf files. It adds an optional fourth argument to the CacheEnable directive: CacheEnable

Re: [RFC] enhancement: mod_cache bypass

2014-08-23 Thread Mark Montague
On 2014-08-23 5:19, Graham Leggett wrote: On 23 Aug 2014, at 03:50, Mark Montague m...@catseye.org mailto:m...@catseye.org wrote: I've attached a proof-of-concept patch against httpd 2.4.10 that allows mod_cache to be bypassed under conditions specified in the conf files. Does

Re: [RFC] enhancement: mod_cache bypass

2014-08-23 Thread Graham Leggett
/dev.catseye.org.conf: CacheEnable cannot occur within If section [root@sky ~]# Also, any solution has to work within both the quick handler phase and the normal handler phase of mod_cache. The solution here is to lift the restriction above. Having a generic mechanism to handle conditional

Re: [RFC] enhancement: mod_cache bypass

2014-08-23 Thread Mark Montague
-Control response header. There is - use “Cache-Control: private”. This will tell all public caches, including mod_cache and ISP caches, not to cache content with cookies attached, while at the same time telling browser caches that they should. The problem is not whether the content should

Re: [RFC] enhancement: mod_cache bypass

2014-08-23 Thread Mark Montague
On 2014-08-23 17:43, Mark Montague wrote: - Back-end sets response header Cache-Control: max-age=0, s-maxage=14400 so that mod_cache caches the response, but ISP caches and browser caches do not. (mod_cache removes s-maxage and does not pass it upstream). mod_cache shouldn’t remove any

Re: [RFC] enhancement: mod_cache bypass

2014-08-23 Thread Tim Bannister
On 23 August 2014 14:40:36 GMT+01:00, Mark Montague m...@catseye.org wrote: On 2014-08-23 5:19, Graham Leggett wrote: On 23 Aug 2014, at 03:50, Mark Montague m...@catseye.org mailto:m...@catseye.org wrote: I've attached a proof-of-concept patch against httpd 2.4.10 that allows mod_cache

[RFC] enhancement: mod_cache bypass

2014-08-22 Thread Mark Montague
I've attached a proof-of-concept patch against httpd 2.4.10 that allows mod_cache to be bypassed under conditions specified in the conf files. It adds an optional fourth argument to the CacheEnable directive: CacheEnable cache_type [url-string] [expr=expression] If the expression is present

Re: IF/ELSE- section and mod_cache errors

2014-04-29 Thread Yann Ylavic
On Mon, Apr 28, 2014 at 4:57 PM, Graham Leggett minf...@sharp.fm wrote: Oddly enough I encountered the same bug this week while trying to trace an unrelated uncacheable 304. +1 to the patch. Thanks for testing/reviewing. Commited in r1591143.

Re: IF/ELSE- section and mod_cache errors

2014-04-28 Thread Chriss
://my.host This time I got a valid answer of my backend, but due to the missing query-string [(null)] with the wrong content. Worst thing is, this wrong answer got stored by mod_cache for the full-request with the correct query string. So for the following requests with the Query-String, I got

Re: IF/ELSE- section and mod_cache errors

2014-04-28 Thread Graham Leggett
On 27 Apr 2014, at 7:14 PM, Yann Ylavic ylavic@gmail.com wrote: Could you try the following patch? Index: modules/cache/mod_cache.c === --- modules/cache/mod_cache.c(revision 1589129) +++ modules/cache/mod_cache.c

IF/ELSE- section and mod_cache errors

2014-04-27 Thread dev
, or if it can simply be removed? The other bug(?) I found was while using mod_cache together with a bogus backend sending wrong timestamps in the headers leading to [cache:info] [...] AH: cache: /myRequest?myQuery responded with an uncacheable 304, retrying the request. Reason: contradiction

Re: IF/ELSE- section and mod_cache errors

2014-04-27 Thread Eric Covener
The other bug(?) I found was while using mod_cache together with a bogus backend sending wrong timestamps in the headers leading to [cache:info] [...] AH: cache: /myRequest?myQuery responded with an uncacheable 304, retrying the request. Reason: contradiction: 304 Not Modified, but Last

Re: IF/ELSE- section and mod_cache errors

2014-04-27 Thread Yann Ylavic
): ... cache: Key for entity /myRequest?(null) is https://my.host:443/myRequest?, referer: https://my.host This time I got a valid answer of my backend, but due to the missing query-string [(null)] with the wrong content. Worst thing is, this wrong answer got stored by mod_cache for the full-request

Re: mod_cache thundering herd bug

2014-04-21 Thread Graham Leggett
, no thundering herd protection. - If stale content is being deleted, identify why that is. This is likely to be unrelated to thundering herd, but rather in other parts of mod_cache. Regards, Graham --

Re: mod_cache thundering herd bug

2014-04-21 Thread Jim Riggs
); The questions to answer are: - Is there stale content to serve? No stale content, no thundering herd protection. - If stale content is being deleted, identify why that is. This is likely to be unrelated to thundering herd, but rather in other parts of mod_cache. Covener - Are you talking

Re: mod_cache thundering herd bug

2014-04-21 Thread Eric Covener
Covener - Are you talking about my comments in #16 on the ticket? (https://issues.apache.org/bugzilla/show_bug.cgi?id=50317#c16) If so, do either you or Graham have thoughts on the Age header getting returned with stale content? In my testing, when stale content is getting returned, no

Re: mod_cache thundering herd bug

2014-04-19 Thread Eric Covener
On Tue, Apr 8, 2014 at 4:11 PM, Jim Riggs apache-li...@riggs.me wrote: https://issues.apache.org/bugzilla/show_bug.cgi?id=50317 While we are at ApacheCon, I would love to address this nasty bug with someone familiar with 2.2's mod_cache. Our sites were brought down a few times last year

Re: mod_cache thundering herd bug

2014-04-14 Thread Maciej Bogucki
/mod_cache-lock CacheLockMaxAge 5 CacheIgnoreHeaders ETag Set-Cookie Header unset Expires Header unset Cache-Control Header always set Cache-Control max-age=30,stale-while-revalidate=15 /VirtualHost Best Regards Maciej Bogucki

Re: mod_cache thundering herd bug

2014-04-09 Thread Eric Covener
to address this nasty bug with someone familiar with 2.2's mod_cache. Our sites were brought down a few times last year before we finally tracked it down to being this particular bug. I am using a crude backport of the 2.3 patch (r1023398) in 2.2. It works, but I don't know if it is correct

Re: mod_cache thundering herd bug

2014-04-09 Thread Jim Riggs
On 9 Apr 2014, at 14:46, Eric Covener cove...@gmail.com wrote: r1023398 for 2.2: http://people.apache.org/~covener/patches/httpd-2.2.x-thunder.diff The remove_url() prevents other threads from serving a stale cached file during refresh of a slow response, but it's unnecessary to have a

mod_cache thundering herd bug

2014-04-08 Thread Jim Riggs
https://issues.apache.org/bugzilla/show_bug.cgi?id=50317 While we are at ApacheCon, I would love to address this nasty bug with someone familiar with 2.2's mod_cache. Our sites were brought down a few times last year before we finally tracked it down to being this particular bug. I am using

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-27 Thread Yann Ylavic
all of the fields for the response to the original request and for any response that is revalidated (i.e., forward the new fields received in 304), but not for the requests that are entirely handled by the cache. Thank you for clarification, hence mod_cache is allowed to serve the cached

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-27 Thread Yann Ylavic
I have already created the bugzilla issue #54706 nearly 2 weeks ago, about mod_cache that may serve cached private= or no-cache= response headers. Should I link something discussion from here or the patch to this issue ? Regards, Yann.

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-27 Thread Graham Leggett
On 27 Mar 2013, at 6:06 PM, Yann Ylavic ylavic@gmail.com wrote: Index: modules/cache/mod_cache.h === --- modules/cache/mod_cache.h (revision 1461557) +++ modules/cache/mod_cache.h (working copy) @@ -152,9 +152,12 @@ /*

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-27 Thread Yann Ylavic
On Wed, Mar 27, 2013 at 5:44 PM, Graham Leggett minf...@sharp.fm wrote: Been snowed under and haven't had a chance to look at this in detail, but one quick thing - we would definitely want to be able to backport this to v2.4 so as to get it into people's hands, and to do that, we cannot

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-27 Thread Yann Ylavic
In fact this patch is probably better since it does not change h-resp_hdrs before calling cache_accept_headers() which uses them. Regars, Yann. Index: modules/cache/cache_util.c === --- modules/cache/cache_util.c (revision 1461557)

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-27 Thread Yann Ylavic
Sorry for my precipitation, the Content-Type is stripped from the validated (stale) headers with the previous patch, we have to do a copy like below. Regards, Yann. Index: modules/cache/cache_util.c === ---

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-27 Thread Yann Ylavic
The latest patch is attached to bugzilla #54706. Regards, Yann.

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-25 Thread Roy T. Fielding
On Mar 13, 2013, at 10:20 AM, Graham Leggett wrote: On 11 Mar 2013, at 12:50 PM, Yann Ylavic ylavic@gmail.com wrote: The way I read the spec, the specified field-name(s) MUST NOT be sent in the response to a subsequent request without successful revalidation with the origin server.

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-13 Thread Yann Ylavic
Here is the patch that strips the no-cache= or private= specified headers after the origin server's validation, leaving the only headers updated by the origin. Regards, Yann. Index: modules/cache/cache_storage.c === ---

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-13 Thread Graham Leggett
On 11 Mar 2013, at 12:50 PM, Yann Ylavic ylavic@gmail.com wrote: The way I read the spec, the specified field-name(s) MUST NOT be sent in the response to a subsequent request without successful revalidation with the origin server. What this means is that if the specified field names are

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-13 Thread Yann Ylavic
On Wed, Mar 13, 2013 at 6:20 PM, Graham Leggett minf...@sharp.fm wrote: On 11 Mar 2013, at 12:50 PM, Yann Ylavic ylavic@gmail.com wrote: The way I read the spec, the specified field-name(s) MUST NOT be sent in the response to a subsequent request without successful revalidation with the

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-13 Thread Graham Leggett
On 13 Mar 2013, at 7:27 PM, Yann Ylavic ylavic@gmail.com wrote: How would the origin invalidate a Set-Cookie, with an empty one ? I would imagine with a 200 OK. Roy would be able to confirm. Regards, Graham -- smime.p7s Description: S/MIME cryptographic signature

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-13 Thread Tom Evans
On Wed, Mar 13, 2013 at 5:27 PM, Yann Ylavic ylavic@gmail.com wrote: How would the origin invalidate a Set-Cookie, with an empty one ? Regards, Yann. Set it again, with an in the past expiry date. Cheers Tom

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-13 Thread Yann Ylavic
On Wed, Mar 13, 2013 at 6:30 PM, Graham Leggett minf...@sharp.fm wrote: On 13 Mar 2013, at 7:27 PM, Yann Ylavic ylavic@gmail.com wrote: How would the origin invalidate a Set-Cookie, with an empty one ? I would imagine with a 200 OK. Roy would be able to confirm. Well, I can't see the

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-13 Thread Yann Ylavic
On Wed, Mar 13, 2013 at 6:35 PM, Tom Evans tevans...@googlemail.com wrote: On Wed, Mar 13, 2013 at 5:27 PM, Yann Ylavic ylavic@gmail.com wrote: How would the origin invalidate a Set-Cookie, with an empty one ? Regards, Yann. Set it again, with an in the past expiry date. Well, that's

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-13 Thread Tim Bannister
On 13 Mar 2013, at 17:41, Yann Ylavic ylavic@gmail.com wrote: On Wed, Mar 13, 2013 at 6:35 PM, Tom Evans tevans...@googlemail.com wrote: On Wed, Mar 13, 2013 at 5:27 PM, Yann Ylavic ylavic@gmail.com wrote: How would the origin invalidate a Set-Cookie, with an empty one ? Regards,

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-13 Thread Yann Ylavic
: Set-Cookie: data=AA ReverseProxy: Cache-Control: private=Set-Cookie ClientB: GET /foo HTTP/1.1 ClientB: Cookie: data=BB ReverseProxy: GET /foo HTTP/1.1 ReverseProxy: Cookie: data=BBB Origin: HTTP/1.1 304 Not Modified Yes, about what happens now, the ReverseProxy (mod_cache) must

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-11 Thread Yann Ylavic
On Sun, Mar 10, 2013 at 1:55 AM, Graham Leggett minf...@sharp.fm wrote: On 04 Mar 2013, at 8:22 PM, ylavic dev ylavic@gmail.com wrote: For what I understand, mod_cache is allowed to serve its cached entity (though without the specified header(s)). I read this through again, this time

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-09 Thread Graham Leggett
On 04 Mar 2013, at 8:22 PM, ylavic dev ylavic@gmail.com wrote: I've been working on a patch for mod_cache to deal (fully) with the response header Cache-Control and the no-cache=header or private=header directives. This feature is mainly used with the Set-Cookie header, and allows

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-06 Thread Yann Ylavic
Hi, On Mon, Mar 4, 2013 at 7:22 PM, ylavic dev ylavic@gmail.com wrote: I've been working on a patch for mod_cache to deal (fully) with the response header Cache-Control and the no-cache=header or private=header directives. I realize that, maybe, the patch should have been included

Re: mod_cache with Cache-Control no-cache= or private=

2013-03-06 Thread Graham Leggett
On 06 Mar 2013, at 12:04 PM, Yann Ylavic ylavic@gmail.com wrote: I've been working on a patch for mod_cache to deal (fully) with the response header Cache-Control and the no-cache=header or private=header directives. I realize that, maybe, the patch should have been included

mod_cache with Cache-Control no-cache= or private=

2013-03-04 Thread ylavic dev
Hi, I've been working on a patch for mod_cache to deal (fully) with the response header Cache-Control and the no-cache=header or private=header directives. This feature is mainly used with the Set-Cookie header, and allows the origin server to control the caching of that particular header

mod_cache logging when CacheRoot does not exist

2013-01-28 Thread Jan Kaluza
to set LogLevel to debug. I think mod_cache should log message 00765 with ERR log level instead of DEBUG (attached patch does that) or new mod_cache_disk log message should be added to address this particular error. Regards, Jan Kaluza Index: modules/cache/mod_cache.c

Question about revision 1070179 (mod_cache) that has been reverted on 2.4.x but not on trunk

2012-12-04 Thread Christophe JAILLET
Hi, list. On trunk, we can find at revision 1070179 (http://svn.apache.org/viewvc?view=revisionsortby=daterevision=1070179) a patch which is about: mod_cache: When a request other than GET or HEAD arrives, we must invalidate existing cache entities as per RFC2616 13.10. PR 15868

Re: Question about revision 1070179 (mod_cache) that has been reverted on 2.4.x but not on trunk

2012-12-04 Thread Graham Leggett
On 05 Dec 2012, at 12:02 AM, Christophe JAILLET christophe.jail...@wanadoo.fr wrote: On trunk, we can find at revision 1070179 (http://svn.apache.org/viewvc?view=revisionsortby=daterevision=1070179) a patch which is about: mod_cache: When a request other than GET or HEAD arrives, we

Re: corrupt brigades when using mod_cache in reverse proxy

2011-11-19 Thread f_los_ch
, den 19.11.2011, 03:09 +0200 schrieb Graham Leggett: On 18 Nov 2011, at 9:50 PM, f_los_ch wrote: When enabling mod_cache in my reverse-proxy scenario, the first file with a filesize above some threshold gets delivered corrupted, subsequent requests served from cache are fine. Can you

Re: corrupt brigades when using mod_cache in reverse proxy

2011-11-19 Thread Graham Leggett
On 19 Nov 2011, at 3:56 PM, f_los_ch wrote: Thanks for the reply and your patch - it worked! I could not longer reproduce diffs for cached/uncached files. The log with dumped buckets according to my previous patch is again available at: http://paste2.org/p/1785342 Now, when the location is

Re: corrupt brigades when using mod_cache in reverse proxy

2011-11-19 Thread Florian S.
Yes, I can confirm that this patch works for me, too. And now I understand your point: Buffering/keeping back the output via an additional brigade until a flush occurs isn't actually needed for the cache-filter as it could simply be passed along immediately. Seems pretty reasonable. I'll use it

corrupt brigades when using mod_cache in reverse proxy

2011-11-18 Thread f_los_ch
Hi together, I'm messing around with a strange bug now for a few days: When enabling mod_cache in my reverse-proxy scenario, the first file with a filesize above some threshold gets delivered corrupted, subsequent requests served from cache are fine. I noticed it first with some broken images

Re: corrupt brigades when using mod_cache in reverse proxy

2011-11-18 Thread Graham Leggett
On 18 Nov 2011, at 9:50 PM, f_los_ch wrote: When enabling mod_cache in my reverse-proxy scenario, the first file with a filesize above some threshold gets delivered corrupted, subsequent requests served from cache are fine. Can you confirm if the following patch makes any difference for you

Re: mod_cache incompatible with efficient PHP?

2011-09-18 Thread Graham Leggett
requests (or indeed any type of request) breaks mod_cache. I believe Action is a key part of the standard / recommended way to use php with fcgi, and fcgi is needed for even moderate efficiency. Being able to use mod_cache with PHP seems like a pretty important use case. Is there hope

mod_cache incompatible with efficient PHP?

2011-09-17 Thread Bill Lipa
mod_cache. I believe Action is a key part of the standard / recommended way to use php with fcgi, and fcgi is needed for even moderate efficiency. Being able to use mod_cache with PHP seems like a pretty important use case. Is there hope for an Apache-only caching solution for php sites? Thank you!

Re: mod_cache not caching 301s

2011-05-12 Thread Damon Green
an issue with mod_cache, it refuses to cache redirects (301) and insists on cacheing 404 error responses, so really two issues. I'm using Apache 2.2.17 and the mod_cache/mod_disk_cache from Apache 2.3 which serves stale content from its disk cache when the Tomcat is unavailable. (patched version from

mod_cache not caching 301s

2011-05-11 Thread Damon Green
Hi Folks, I posted this question on users but haven't had any joy there, hoping someone here may know more. I have an issue with mod_cache, it refuses to cache redirects (301) and insists on cacheing 404 error responses, so really two issues. I'm using Apache 2.2.17 and the mod_cache

Re: mod_cache not caching 301s

2011-05-11 Thread Damon Green
On Wed, May 11, 2011 at 9:49 AM, Damon Green damon...@gmail.com wrote: Hi Folks, I posted this question on users but haven't had any joy there, hoping someone here may know more. I have an issue with mod_cache, it refuses to cache redirects (301) and insists on cacheing 404 error responses

Re: mod_cache: serving stale content during outages

2010-10-19 Thread Mark Nottingham
received response unless the cached entry * includes the must-revalidate cache-control directive (see section * 14.9). */ The next patch teaches mod_cache how to optionally serve stale content should a backend be responding with 5xx errors, as per the RFC above. In order to make

Re: mod_cache: use of ap_log_error() instead of ap_log_rerror()

2010-10-17 Thread Stefan Fritsch
Hi Graham, On Sunday 17 October 2010, Graham Leggett wrote: Across mod_cache, all the logging directives log at the server scope using ap_log_error(), instead of at the request scope ap_log_rerror(). While I suspect the original intention of this was because the quick_handler() is involved

mod_cache: overriding Cache-Control and Vary

2010-10-17 Thread Graham Leggett
Hi all, One of the missing things that mod_cache can't do that other caches can is to be able to override the Cache-Control and Vary headers, so that the cache can be targeted for custom behaviour. The classic use case is when you insert request headers into your server stack, which you

Re: mod_cache: overriding Cache-Control and Vary

2010-10-17 Thread Roy T. Fielding
On Oct 17, 2010, at 9:19 AM, Graham Leggett wrote: Hi all, One of the missing things that mod_cache can't do that other caches can is to be able to override the Cache-Control and Vary headers, so that the cache can be targeted for custom behaviour. The classic use case is when you

mod_cache: use of ap_log_error() instead of ap_log_rerror()

2010-10-16 Thread Graham Leggett
Hi all, Across mod_cache, all the logging directives log at the server scope using ap_log_error(), instead of at the request scope ap_log_rerror(). While I suspect the original intention of this was because the quick_handler() is involved, is it true to assume that the ap_log_rerror

Re: [us...@httpd] mod_cache: possible bug with cache-control max-age vs expires (rfc2616)

2010-10-13 Thread Igor Galić
Hi Frank, Morning list; This list might be the wrong place to discuss such matters. While playing around with mod_cache Drupal (Pressflow actually) I think I may have found a problem in mod_cache's implementation of the http/1.1 cache expiration mechanism. According to the spec (rfc

Re: mod_cache: disk layout for vary support

2010-10-11 Thread Igor Galić
- William A. Rowe Jr. wr...@rowe-clan.net wrote: On 10/10/2010 11:26 PM, Paul Querna wrote: I would rather change the defaults to use only two letters and two levels deep for the cache directories, and probally restrict the see below character set even further to just [a-zA-Z].

mod_cache: serving stale content during outages

2010-10-11 Thread Graham Leggett
, * or act as if the server failed to respond. In the latter case, it MAY * return a previously received response unless the cached entry * includes the must-revalidate cache-control directive (see section * 14.9). */ The next patch teaches mod_cache how to optionally serve

mod_cache: disk layout for vary support

2010-10-10 Thread Graham Leggett
Hi all, One of the things that needs to be fixed with mod_cache is the support for caching varying responses. In the current cache, we store it as below, as an additional directory tree below the original URL's directory tree. This wastes lots of inodes, and is very expensive to write

Re: mod_cache: disk layout for vary support

2010-10-10 Thread William A. Rowe Jr.
On 10/10/2010 10:56 AM, Graham Leggett wrote: One of the things that needs to be fixed with mod_cache is the support for caching varying responses. In the current cache, we store it as below, as an additional directory tree below the original URL's directory tree. This wastes lots

Re: mod_cache: disk layout for vary support

2010-10-10 Thread pfee
- Original Message From: William A. Rowe Jr. wr...@rowe-clan.net To: dev@httpd.apache.org Sent: Sunday, 10 October, 2010 18:09:23 Subject: Re: mod_cache: disk layout for vary support On 10/10/2010 10:56 AM, Graham Leggett wrote: One of the things that needs to be fixed

Re: mod_cache: disk layout for vary support

2010-10-10 Thread Paul Querna
On Sun, Oct 10, 2010 at 8:56 AM, Graham Leggett minf...@sharp.fm wrote: Hi all, One of the things that needs to be fixed with mod_cache is the support for caching varying responses. In the current cache, we store it as below, as an additional directory tree below the original URL's directory

Re: mod_cache: disk layout for vary support

2010-10-10 Thread William A. Rowe Jr.
On 10/10/2010 11:26 PM, Paul Querna wrote: I would rather change the defaults to use only two letters and two levels deep for the cache directories, and probally restrict the character set even further to just [a-zA-Z]. I think a case should be made for not using sub-directories inside the

mod_cache: Setting the base URL of the cache key

2010-10-02 Thread Graham Leggett
Hi all, When caches sit behind load balancers, the server might be called http://node 567:8080/, while you might want to cache the entities using keys derived from the public endpoint http://example.com/. To make this possible, I plan a CacheKeyBaseURL, which allows you to override the

mod_cache: scoping directives to per directory/location

2010-09-30 Thread Graham Leggett
Hi all, In the case of some of the mod_cache and mod_disk_cache directives, there isn't a reason to force these directives to be server wide, they can be per location instead. These are mainly directives that control what goes into the cache, like CacheStorePrivate, CacheStoreNoStore

Re: mod_cache: scoping directives to per directory/location

2010-09-30 Thread Niklas Edmundsson
On Thu, 30 Sep 2010, Graham Leggett wrote: Hi all, In the case of some of the mod_cache and mod_disk_cache directives, there isn't a reason to force these directives to be server wide, they can be per location instead. These are mainly directives that control what goes into the cache, like

mod_cache: caching status

2010-09-26 Thread Graham Leggett
Hi all, One of the things that mod_cache doesn't do very well is tell the world what it is doing. This can vary from did this request score a miss/hit/revalidate? to how efficient is this url space overall generally. This problem is highlighted in https://issues.apache.org/bugzilla

mod_cache: making private headers private

2010-09-21 Thread Graham Leggett
Hi all, mod_cache.h currently contains the following declarations, all of which are really private functions that have been accidentally made public. I plan to move them to a private header file for this purpose, unless any of these declarations need to stay, which in turn means they

mod_cache: final API cleanups

2010-09-21 Thread Graham Leggett
Hi all, Given the number of MMN bumps that mod_cache is generating, I'd like to bump the MMN just once for the following changes that need to be made (happy to bump the MMN for each one as well, don't know how people feel): - Remove the MOD_CACHE_REQUEST_REC hack. The mod_cache filter

Re: mod_cache: store_body() bites off more than it can chew

2010-09-13 Thread Paul Fee
Graham Leggett wrote: On 06 Sep 2010, at 11:00 PM, Paul Querna wrote: Isn't this problem an artifact of how all bucket brigades work, and is present in all output filter chains? An output filter might be called multiple times, but a single bucket can still contain a 4gb chunk easily. It

Re: mod_cache: store_body() bites off more than it can chew

2010-09-13 Thread Graham Leggett
On 13 Sep 2010, at 1:14 PM, Paul Fee wrote: Retrieving bodies from the cache has a similar scalability issue. The CACHE_OUT filter makes a single call to the provider's recall_body(). The entire body must be placed in a single brigade which is sent along the filter chain with a single

Re: mod_cache: store_body() bites off more than it can chew

2010-09-13 Thread Graham Leggett
On 13 Sep 2010, at 4:18 PM, Plüm, Rüdiger, VF-Group wrote: It is not a problem for mod_disk_cache as you say, but I guess he meant for 3rd party providers that could only deliver the cached responses via heap buckets. The cache provider itself puts the bucket in the brigade, and has the

RE: mod_cache: store_body() bites off more than it can chew

2010-09-13 Thread Plüm, Rüdiger, VF-Group
-Original Message- From: Graham Leggett Sent: Montag, 13. September 2010 16:35 To: dev@httpd.apache.org Subject: Re: mod_cache: store_body() bites off more than it can chew On 13 Sep 2010, at 4:18 PM, Plüm, Rüdiger, VF-Group wrote: It is not a problem for mod_disk_cache

RE: mod_cache: store_body() bites off more than it can chew

2010-09-13 Thread Paul Fee
Plüm, Rüdiger, VF-Group wrote: -Original Message- From: Graham Leggett Sent: Montag, 13. September 2010 16:35 To: dev@httpd.apache.org Subject: Re: mod_cache: store_body() bites off more than it can chew On 13 Sep 2010, at 4:18 PM, Plüm, Rüdiger, VF-Group wrote

  1   2   3   4   5   6   7   8   >