开发者

Rails 4 : What is cached when using config.cache_classes = true

开发者 https://www.devze.com 2023-01-01 01:03 出处:网络
I was just wondering and didn\'t find explicit response on what in the model class (ActiveRecord) is cached when setting config.cache_classes to true ?

I was just wondering and didn't find explicit response on what in the model class (ActiveRecord) is cached when setting config.cache_classes to true ?

Could someone tell me o开发者_运维问答r point me to the doc I didn't found ?

Thanks


It determines whether or not your application classes are reloaded on each request. If it's true, you have to restart your server for code changes to take effect (i.e. you set it to true in production, false in development.)

Documentation is here.


What is cached when using config.cache_classes = true

It responsible for two thing in rails 4

1. It prevent class reloading between requests.

2. It ensure Rack::Lock in not included in middleware stack, so that your thread don't get locked.

0

精彩评论

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