MediaProxy cache invalidation via Admin API
We started down the path of cache invalidation in #1509 (closed) but we have run into some edge cases that make the feature either abused as a DoS by being able to break other posters' attachments, or doesn't handle delete & redraft situations properly. It's very complex and we've talked through the issues and it comes down to there currently not being a way to identify the post the attachment belongs to; we only know the attachments that belong to a post!
Until enough has changed to make this reliable and abuse-proof, we will move the functionality to the Admin API and permit admins to purge and ban MediaProxy URLs.
I'd like to propose we create Admin API endpoints that permit the following:
- Purge and optionally ban a MediaProxy URL
- Fetch a paginated list of all banned MediaProxy URLs in Cachex
- Remove a banned MediaProxy URL from Cachex