开发者

render a page to a file with rails

开发者 https://www.devze.com 2023-03-09 08:33 出处:网络
I have a background process that loads a Rails 3.0 environment.I would like to have that process refresh cached pages instead of having to wait for them to be loaded the first time.How could I take a

I have a background process that loads a Rails 3.0 environment. I would like to have that process refresh cached pages instead of having to wait for them to be loaded the first time. How could I take a set of开发者_开发知识库 params push it through the render pipeline to the point where I could direct the plain html to a file?


Rails 3.0 is a Rack Application. You can use a Rack Middleware to do it. Take a look a Rack::Deflater::GzipStream for a code sample and Rails on Rack for the RoR specific parts.

0

精彩评论

暂无评论...
验证码 换一张
取 消