ruby on rails - Making use of rendering templates and will_paginate in script/console or a rake task -
I want to pre-generate some pages using a rake function. I want to generate pages of all users (800.000 and $ 90 users per page are fewer than 9000 pages per page). Save the page to disk.
Now I request a lot of rack work in a controller action and I get the result by mechanizing and saving the page on the disk.
The problem is that I do not want to make so many requests on my server (because this time has expired) Speed does not make any difference because I have an additional server. I generated the page without too many requests I want to do this, so I get the HTML string myself
In this view I am using Will_Pegnet Assistant for endorsement. I really do not know how a rake is using things like Will_paginate, Response Variables to create paging in work.
Can someone help curb the page without requesting me?
Thank you
I find it myself and other cache Ask another question to load before.
Preheat.it app.get ("/") end So in your case, using cron jobs for pre-summer Can Cache Do something like
total_agers_page = 9000 # character to preheat.it do 1.upto (total_user_pages). I | App.get ("/ users? Page = # {i}") End End I checked and Rails.cache was introduced in 2.1, so you do well there Are there. This gem will not call your webserver, as opposed to mechanized.
"Activit's fetch method is being modified only in Ruby process which is using preheat, curl page Call through your frontend webserver and will not be affected by the preheat.it, while the app will call your controller directly in your router's Ruby Process. "
Would be to use Rails.cache your app to take advantage.
Comments
Post a Comment