开发者

Manually Reload Rails classes that have been 'cached' by enabling cache_classes = true

开发者 https://www.devze.com 2023-03-25 06:25 出处:网络
I\'m trying to speed up my web fronted by caching classes in development, My::Application.configure do

I'm trying to speed up my web fronted by caching classes in development,

My::Application.configure do
  config.cache_classes = true
end

but I would like to manually reload classes using guard if a file in my model or lib changes.

So the question is this: without restarting my local server, how can i manually trigger a class cache refresh?

Update

You can use r开发者_开发知识库eload!

don't know why i didn't think of that sooner


Even I don't answer your raw question, this link should answer your goal as a whole.

In a nutshell:

Reload Rails code in development mode only when change is detected

0

精彩评论

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