One call to get_post_meta()
fetches all met keys and values for that post. All these values are then stored in the cache. The next call will just fetch the data from the cache. So you can safely call that function multiple times.
In details:
get_post_meta()
callsget_metadata('post', $post_id, $key, $single);
get_metadata()
checks the cache and callsupdate_meta_cache()
if it doesn’t find an existing cache.-
update_meta_cache()
fetches all entries with:"SELECT $column, meta_key, meta_value FROM $table WHERE $column IN ($id_list) ORDER BY $id_column ASC"
The same is true for user meta values.