The EntityDescriptor's ID element in the metadata is generated here:
This value has some randomness:
This results in different metadata files every time they are generated, even though nothing has actually changed. This prevents caching mechanism from working (checksums, HTTP Etag, etc).
A similar issue existed in SimpleSAMLphp, which was fixed by constructing the ID from the content: simplesamlphp/simplesamlphp@4fdb5a3
I tried that approach here: master...dnmvisser:pysaml2:dv_stablise_ids1 and that appears to work.
Since there is no requirement for ID to be random, I think this would be a nice improvement?