code: def _set_cache_(self, attr):
          
          if attr == "size":
              oinfo = self.repo.odb.info(self.binsha)
              self.size = oinfo.size
              # assert oinfo.type == self.type, _assertion_msg_format % (self.binsha, oinfo.type, self.type)
          else:
              super(Object, self)._set_cache_(attr)
docs: Retrieve object information