[Mongrel] Moving page_cache_directory

Russell Norris rsl at swimcommunity.org
Tue Oct 31 11:32:44 EST 2006

I was thinking that DirHandler or RailsHandler would be the answer but I
can't seem to figure out what to do with them. The RDoc is, um... Let's say
"terse". And there's nothing [that I saw] on the main site. Any chance
you've seen a good breakdown/tutorial/whatever somewhere online?


On 10/31/06, Jan Svitok <jan.svitok at gmail.com> wrote:
> On 10/31/06, Russell Norris <rsl at swimcommunity.org> wrote:
> > Howdy. I'm working on a RoR CMS and need cached pages to all be in
> > public/cache rather than public [in order to set svn:ignore on all the
> files
> > properly]. I can get page_cache_directory set correctly and the pages
> are
> > cached in the right place but Mongrel isn't serving them because it's
> only
> > looking for them in public. During development I know I can set -r
> > public/cache but doing that means that the images and stylesheets don't
> get
> > picked up. I'm sure there's a way to tell Mongrel to look in both places
> or
> > at least to serve assets from public and cached pages from public/cache.
> > Isn't there?
> >
> > Thanks in advance.
> I'm not sure if any of these will work, they're just hints:
> 1. try prepend DirHandler mounted to public/cache :in_front of rails
> handler using -S switch
>           uri "/", :handler => Mongrel::DirHandler.new("/public/cache",
> false)
>    This will unfortunately not look for PATH_INFO + '.html' files.
> 2. try patching RailsHandler to look also in cache. For that a proxy
> handler
>   would be useful - one that will hold more DirHandlers and will
> delegate to whichever
>   wants to serve the particular file. In this case RailsHandler will
> take care of +.html files.
>   You'd need to implement new, can_serve? and process which seems pretty
> easy.
> _______________________________________________
> Mongrel-users mailing list
> Mongrel-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/mongrel-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20061031/8325bac9/attachment-0001.html 

More information about the Mongrel-users mailing list