Parse AWS Sigv4 X-AMZ-Expiration parameters for rich media links
Best solution to prevent unsynchronized pleroma media cache and rich media cache is to actually set the correct TTL for these objects upon insertion into the rich media cache. Adjusting the global rich media cache TTL is a losing strategy.
Might make sense to write a small elixir library that parses these URLs and we can share the work easily.
Example URL:
https://example.com/zp5zgly2.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=BL3TRDJRRUOD5US587AZ%2F20190305%2Ford-1%2Fs3%2Faws4_request&X-Amz-Date=20190305T165256Z&X-Amz-Expires=10800&X-Amz-SignedHeaders=host&X-Amz-Signature=574f7a25f5d93e54390c1d42eba2844920b191f544c59b6a05ef9172aaee68bd
https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html