Passenger and conditional page caching, part 2

A while back I posted about Passenger and how it could affect my Giggle website.

Today I got around to some testing to see if the idea I outlined would actually work. Unfortunately it seems that it doesn’t. Passenger has built-in support for running Rails applications, and it looks like its code for checking for cached pages pre-empts everything else. Even if you use the option to turn rewrite rules back on, if the cached page for a given URL exists then it will serve that and never evaluate the rewrite rule.

I guess I could try and submit a patch for Passenger to provide some more options there, but I’d have to (re-)learn some C++ to do so :-) In the meantime I probably need to disable page-caching in Giggle if I want to host it in Passenger.

Some good news was that I found out that newer versions of Passenger have included Rack support as well as Rails, so it could be useful for other simpler Ruby web applications. Here’s one I hacked up today to try it out. Rack is really intended as a low-level common interface for frameworks to use, but you can write directly to it somewhat in the style of old CGI scripts.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*