hooopo/second_level_cache — pull request #18 by huacnlee (2014-12-09 11:08:08+00:00)
Title: Fix has one include not touch cache [未完成]

有个 Bug，当 has_one 的 Preloader 开启 second_level_cache 模式以后，会导致：

```
NoMethodError: undefined method `each' for nil:NilClass
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader/association.rb:93:in `block in associated_records_by_owner'
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader/association.rb:92:in `each'
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader/association.rb:92:in `associated_records_by_owner'
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader/singular_association.rb:9:in `preload'
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader/association.rb:20:in `run'
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader.rb:146:in `block (2 levels) in preloaders_for_one'
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader.rb:144:in `each'
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader.rb:144:in `map'
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader.rb:144:in `block in preloaders_for_one'
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader.rb:143:in `each'
/Users/jason/.rvm/gems/ruby-2.1.4/gems/activerecord-4.2.0.rc2/lib/active_record/associations/preloader.rb:143:in `flat_map'
```

目前我这么开启，User.includes(:profile) 的能命中到缓存了，但会出上面的错误