Thanks for the reply Geoff... that isn't quite the problem. Here's a further explanation that should better articulate it.
I've turned on debug on Apache, and this is what's currently happening when content is found in the cache: [Fri Apr 01 14:14:13 2005] [debug] mod_disk_cache.c(371): disk_cache: Recalled cached URL info header www.company.com/page.html? [Fri Apr 01 14:14:13 2005] [debug] mod_disk_cache.c(502): disk_cache: Recalled headers for URL www.company.com/page.html? [Fri Apr 01 14:14:13 2005] [error] --> MYFILTER called here... <-- [Fri Apr 01 14:14:13 2005] [debug] mod_cache.c(220): cache: running CACHE_OUT filter [Fri Apr 01 14:14:13 2005] [debug] mod_cache.c(229): cache: serving /page.html --> where I *want* MYFILTER to go <-- [Fri Apr 01 14:14:13 2005] [debug] mod_deflate.c(468): [client 192.168.0.101] Zlib: Compressed 7233 to 2171 : URL /page.html [Fri Apr 01 14:14:13 2005] [debug] mod_headers.c(527): headers: ap_headers_output_filter() [Fri Apr 01 14:14:13 2005] [debug] mod_deflate.c(468): [client 192.168.0.101] Zlib: Compressed 7233 to 2171 : URL /page.html See the problem? MYFILTER is getting inserted before the cache is serving up the content, but I really want it to go after (otherwise MYFILTER doesn't see the body content). Is there a way around this aside from modifying mod_cache? thanks, Jeff On Mar 31, 2005 8:11 PM, Geoffrey Young <[EMAIL PROTECTED]> wrote: > > > I've studied the MP2 docs (including the 3 books I have: mp Cookbook, > > Lincoln Stein's and Stas Bekman's), but really can't find anything that > > tells me precisely how to insert an MP2 filter with a specific AP_FTYPE_*. > > > > Here's a simple flow of what I'd like to have happen: > > > > 1 - mod_cache [got valid content in cache? If so, go to 4; if not, go to 2] > > 2 - mod_proxy [fetch content from origin web] > > 3 - mod_cache [content cacheable? If so, cache it locally] > > 4 - *MY FILTER* > > 5 - deflate > > > > How can I get MYFILTER inserted in just the right place? (And ideally it > > doesn't require modifying Apache source code to change AP_FTYPE values > > for mod_cache...!) > > try PerlSetOutputFilter > > http://perl.apache.org/docs/2.0/user/handlers/filters.html#C_PerlSetOutputFilter_ > > HTH > > --Geoff >