@K2049 would you mind making an RFE here with your ideas? Foreman
Looks like 8 years ago we set this explicitly to always be expired: Bug #10495: Custom repositories do not define 'metadata_expire = 1' - Katello - Foreman
It would be very simple to create a new setting (assuming that’s the wish), in fact even someone without any Ruby experience could probably figure it out quickly by just grepping our code for the use of other settings. Could be a good foot in the door for anyone wanting to contribute!
We’d want the default to stay the same.
Now the thing to consider is, why was it hardcoded to 1? That wasn’t an arbitrary decision. I’m going to guess it was to err on the side of ensuring that everything on clients is up to date in case of something like an incremental update (though I think that was introduced before incremental update was even a feature).
I think it should be safe to introduce a setting, but it’s always worth considering first.
Edit: I didn’t realize this thread was so old, I’ll check if there is already an RFE.
Edit edit: I’m guessing it was set to 1 to match Candlepin’s default for RH repos, from that I think it should be safe to make configurable for custom repos.