Follow up after conversation at T320675
When writing new articles or modifying IPA notation it is likely that editors will utilize preview to do trial/error until they come up with IPA that sounds correct. Each of those failed attempts will leave an orphaned file behind. Similarly, this could happen a fair amount after rollout if the original IPA was wrong and needs fixing.
Possible approach
Fetch audio data at parsing time through onParserFirstCallInit hookPersist as a file on PageSaveComplete as a DeferredUpdate making use of the cached audio data so to avoid hitting Google's API twice.- Make use of X-Delete-At as discussed in T320835#8434331 to expire un-used files
Acceptance Criteria
When using switch file-backend, files should have the header X-Delete-At set to a sensible date.
Follow up
When a common solution for expiring objects have been implemented this should be revisited. See T211661.