Installed RoR under lighttpd and noticed that caching some actions didn''t accelerate page serving. The following little example of class TestscriptController < ApplicationController caches_page :index def index @string = Time.now.to_s end end and <html> <head> <title>Test</title> </head> <body> <p>Test</p> <p><%= controller.action_name %></p> <p><%= @string %></p> </body> </html> does work in development mode with caching turned on under WinXP with Webrick. It does not work in lighttpd with fastcgi on FedoraCore. I already browsed through the various log but no obvious errors were to be seen. And Rails / Ruby is able to write into the public directory (as another script of mine puts to good effect). So, does anyone know where the problem might lie? -- Posted via http://www.ruby-forum.com/.
Are you manually setting caching to on under development mode? On 5/17/06, Johannes Hass <johanneshass@o2online.de> wrote:> Installed RoR under lighttpd and noticed that caching some actions > didn''t accelerate page serving. The following little example of > > class TestscriptController < ApplicationController > caches_page :index > > def index > @string = Time.now.to_s > end > end > > and > > <html> > <head> > <title>Test</title> > </head> > <body> > <p>Test</p> > <p><%= controller.action_name %></p> > <p><%= @string %></p> > </body> > </html> > > does work in development mode with caching turned on under WinXP with > Webrick. It does not work in lighttpd with fastcgi on FedoraCore. I > already browsed through the various log but no obvious errors were to be > seen. > > And Rails / Ruby is able to write into the public directory (as another > script of mine puts to good effect). > > So, does anyone know where the problem might lie? > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
Well, Webrick runs in development mode with caching manually turned on and works fine. Lighttpd runs in production mode with the default parameters from /environment/production.rb and does not work. I just tried some shenannigans with the config files and suddenly the above example will create the testscript.html in /public. However, for some weird reason, the testscript.html is always updated which somewhat defeats the purpose of caching. And production.log only tells me: Processing TestscriptController#index (for 124.576.63.1 at 2006-05-17 21:31:01) [GET] Session ID: Parameters: {"action"=>"index", "controller"=>"testscript"} Rendering testscript/index Completed in 0.00559 (178 reqs/sec) | Rendering: 0.00107 (19%) | DB: 0.00000 (0%) | 200 OK -- Posted via http://www.ruby-forum.com/.
Apparently Analagous Threads
- [LLVMdev] ATTENTION: SymbolTable Change!!
- How can $VARIABLES be used inside smbclient -c'xyz' command strings?
- [test-suite] r261857 - [cmake] Add support for arbitrary metrics
- Running Shell Script with R
- [test-suite] r261857 - [cmake] Add support for arbitrary metrics