Identity and usable access data are different
Users, groups and channels are peers. Maintain received peer information locally; many operations also need an access_hash. It is neither an API Hash nor a public identifier reusable across accounts. Full objects, extended information and partial updates have different refresh rules. Update reactively rather than repeatedly fetching unchanged profiles.
Reduced objects need context
A user or channel marked min carries limited data. Follow constructor-specific merge exceptions and retain the message context in which it appeared. Later calls may require a constructor such as inputPeerUserFromMessage instead of an ordinary InputPeer.
Use the user and channel constructor references for fields and exceptions, rather than inferring object type from ID length.
Cache design recommendations
Partition by account and peer type, and record source and completeness. A known ID does not establish permission to read. Test renames, leaving groups, late reduced objects and account switching for stale data and cross-account leakage.