cache belongs_to and has_one relationship