http://www.railsenvy.com/2007/2/28/rails-caching-tutorial
http://www.railsenvy.com/2007/3/20/ruby-on-rails-caching-tutorial-part-2
那Rails2.1结合Will-pagination是如何使用的呢?
routes.rb
map.connect 'users/page/:page', :controller => 'users', :action => 'index', :requirements => { :page => /\d+/}, :page => nil
Will-pagination的分页路径将由
http://localhost:3000/users?page=1,变为
http://localhost:3000/users/page/1
再在Http服务器里配置直接读取静态文件,而不转发到CGI那性能会更上一步了。
请求http://localhost:3000/users 同 http://localhost:3000/users/page/1将会产生同样两个文件,但似乎影响不大。
如果rails采用文件cache,那再使用lighttpd+memcache,是不是比直接rails invoke memcache api强点呢?毕竟Ruby调用c,性能相比还是逊色。