Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Thin forcing page caching: should be configurable

#58

Thin is hard coded to require page caching. Mongrel doesn't do this, so thin is incompatible with some configurations of existing mongrel installations.

I'd like to propose that thin have an optional configuration setting to make it not conduct page caching. Existing installations will be unaffected b/c this would be an optional setting.

The attached lines of code are where I believe the issue is occurring:

http://pastie.textmate.org/private/mdzbkpykitysl2xl4lwzcw

If there is a thin config file, perhaps we could set "page_caching: [true|false]" with the default (when not present) being true?

Changing this line:

elsif file_exist?(cached_path)

to something like:

elsif CONFIG[:page_caching] && file_exist?(cached_path)

This would also help speed up installations a bit where page caching is not required of thin, because the system would not be looking to disk for the cached files, when page caching is disabled.

Hope this helps - drop me a line if I can assist in implementation or explain why this is an important change.

Sincerely - S

Reported by science · April 2nd, 2008 @ 03:24 PM

State: open
Milestone: 0.8.0
Assigned to: macournoyer macournoyer

Activity

  1. macournoyer
    macournoyer
    • Milestone set to 0.8.0
    • State changed from new to open

    Mongrel does have page caching activated all the time, but it's only for GET and HEAD request, which is the issue in this case.

    I'll fix the Rails adapter in THin to only serve the page cache on GET or HEAD request.

    thx for reporting!

    April 2nd, 2008 @ 03:31 PM

  2. science
    science

    Nice one. Thanks. That makes it a no configuration solution for me and for existing deployments. Thanks for the quick response!

    April 2nd, 2008 @ 03:38 PM

  3. macournoyer
    macournoyer
    • State changed from open to resolved

    April 2nd, 2008 @ 08:50 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.