[Mongrel] Moving page_cache_directory

Russell Norris rsl at swimcommunity.org
Tue Oct 31 14:44:09 EST 2006


I spoke too soon. Things are still caching in the wrong place. :/  I think
I've looked at these directories so long they've stopped making sense even
to me.

Anyhow, I'm looking at the RailsHandler now.

RSL

On 10/31/06, Russell Norris <rsl at swimcommunity.org> wrote:
>
> Rick, that did the trick. Thank you so much!
>
> RSL
>
> On 10/31/06, Rick Olson <technoweenie 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.
> > >
> > > RSL
> >
> > I would think that you could just set up a custom DirHandler, but the
> > RailsHandler is taking up the root uri.  I'm not sure this would work,
> > but use a config script like this:
> >
> > uri "/", Mongrel:: DirHandler.new("path/to/public/cache",
> > listing_allowed=true, index_html="index.html"), :in_front => true
> >
> > (the 2nd and 3rd params of DirHandler.new are optional).
> >
> > I'm not sure if the DirHandler will return 404's or just pass on to
> > the next handler in line, which would be the Rails Handler.  If this
> > doesn't work, you'll have to hack the RailsHandler probably.
> >
> > --
> > Rick Olson
> > http://weblog.techno-weenie.net
> > http://mephistoblog.com
> > _______________________________________________
> > 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/ff5ee22e/attachment.html 


More information about the Mongrel-users mailing list