Hi, I''m running a Rails app on Textdrive (Lighttpd 1.4.x to serve up my rails app, and lighttpd is being proxyed by Apache). I have page caching turned on for most every page. When I tail my logs I see that the app is saving the cached content to the filesystem. But the next time I hit that same controller and action it doesn''t serve up the cached page, it runs through the entire workflow again and caches another copy over top the first. If I manually add the .html to my urls and hit them, the cached pages are served up. So I''m thinking something''s going wrong with my rewrites - that it never adds the .html to the end. My lighttpd.conf has the following for rewrite: url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "1$.html" ) I also tried: url.rewrite = ( "^/$" => "index.html", "^([^\.]+)$" => "1$.html" ) I''m no lighttpd or rewrite guru but those look right to me, append .html if the url has no periods in it (besides the host portion). Any ideas? I''m going nuts trying to find out why it won''t serve up the cached content. Do the rewrites have to be specified any place in particular or in some particular order? Thanks, Chris Williams _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Ensure that you''re not running in development mode - caching works in production mode only. On 9/8/05, Williams, Chris <Chris.Williams-yLTBD9Em4aGakBO8gow8eQ@public.gmane.org> wrote:> > Hi, > > I''m running a Rails app on Textdrive (Lighttpd 1.4.x to serve up my rails > app, and lighttpd is being proxyed by Apache). I have page caching turned > on for most every page. When I tail my logs I see that the app is saving the > cached content to the filesystem. But the next time I hit that same > controller and action it doesn''t serve up the cached page, it runs through > the entire workflow again and caches another copy over top the first. > > If I manually add the .html to my urls and hit them, the cached pages are > served up. So I''m thinking something''s going wrong with my rewrites - that > it never adds the .html to the end. > > My lighttpd.conf has the following for rewrite: > > url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "1$.html" ) > > I also tried: > > url.rewrite = ( "^/$" => "index.html", "^([^\.]+)$" => "1$.html" ) > > I''m no lighttpd or rewrite guru but those look right to me, append .html > if the url has no periods in it (besides the host portion). > > Any ideas? I''m going nuts trying to find out why it won''t serve up the > cached content. Do the rewrites have to be specified any place in > particular or in some particular order? > > Thanks, > Chris Williams > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Ensure that you''re not running in development mode - caching works in production mode only. Yes, I''m in production mode. On 9/8/05, Williams, Chris < Chris.Williams-yLTBD9Em4aGakBO8gow8eQ@public.gmane.org <mailto:Chris.Williams-yLTBD9Em4aGakBO8gow8eQ@public.gmane.org> > wrote: Hi, I'' m running a Rails app on Textdrive (Lighttpd 1.4.x to serve up my rails app, and lighttpd is being pr oxyed by Apache). I have page caching turned on for most every page. When I tail my logs I see that the app is saving the cached content to the filesystem. But the next time I hit that same controller and action it doesn ''t serve up the cached page, it runs through the entire workflow again and caches another copy over top the first. If I manually add the .html to my urls and hit them, the cached pages are served up. So I ''m thinking something'' s going wrong with my rewrites - that it never adds the .html to the end. My lighttpd.conf has the following for rewrite: url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "1$.html" ) I also tried: url.rewrite = ( "^/$" => "index.html", "^([^\.]+)$" => "1$.html" ) I'' m no lighttpd or rewrite guru but those look right to me, append .html if the url has no periods in it (besides the host portion). Any ideas? I'' m going nuts try ing to find out why it won ''t serve up the cached content. Do the rewrites have to be specified any place in particular or in some particular order? Thanks, Chris Williams _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails