Hacker News new | past | comments | ask | show | jobs | submit login

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?




Consider applying for YC's W25 batch! Applications are open till Nov 12.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: