Skip to content

Comment on Continuous Cache Warming for Rails

Comments

It should never be used in production or for user-facing or critical client purposes"

script/console production < worker/cache_page.rb

?

Our slow endpoint was on a back-end administrative page only; faking the session data in curl would have been annoying. Also, it was exceeding the timeout limits of our production server

I think you have a bigger problem here.

You're right this is very hacky, it makes me itch, but I'm not sure I have better solution. Why not just use wget to load and cache the page (passing in a unique parameter that you use to expire the cache and skip the filters)?

I don't think that's a better solution, it's similar but less integrated with the app stack.

Good point ... how about just throwing in rufus-scheduler and using excon to make the request?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.