Use the cache_attributes() method

This uses the proper ActiveRecord method to declare cached attributes.

It is deprecated in Rails 4.2.0 so this method will now just produce a warning instead of failing since the `attribute_types_cached_by_default` has been removed.