DEV Community

Discussion on: Auto-reload `config_for` files in Rails

Collapse
 
braindeaf profile image
RobL

I'm just wondering how awful this is if I use this solution production.

I have a case where I need to update a config that is called in middleware. e.g. creating a hostname redirect for a multi-tenant application based on a YAML config. It would be wasteful to restart the whole application, but inefficient to read a file in on every request.

Collapse
 
lxxxvi profile image
Mario

Good question. This article is particurlarly meant for development, I'd be hesitant to use this approach in production.