diff --git a/releases/0.5.0.md b/releases/0.5.0.md index 1f85ae2..3e3c5b0 100644 --- a/releases/0.5.0.md +++ b/releases/0.5.0.md @@ -114,6 +114,34 @@ It is possible to migrate to postgres after first upgrading to 0.5. This is also ### Media Proxy +pict-rs 0.5 supports caching media, and purging cached media after it is no longer necessary to +keep. This behavior is accessed with pict-rs' new `proxy` query parameter at the `/image/original` +endpoint, and the `/image/process.{ext}` endpoint. By passing the URL to an image to the `proxy` +parameter, you can instruct pict-rs to download the media from that URL and cache it locally before +serving it, or a processed version of it. The proxied media is stored for a configurable time limit, +which resets on each access to the proxied media. + +This value can be configured as follows + +In the configuration file +```toml +[media.retention] +proxy = "7d" # units available are "m" for minutes, "h" for hours, "d" for days, and "y" for years +``` + +With environment variables +```bash +PICTRS__MEDIA__RETENTION__PROXY=7d +``` + +On the commandline +```bash +pict-rs run --media-retention-proxy 7d +``` + +More documentation can be found in the [pict-rs readme](https://git.asonix.dog/asonix/pict-rs#api) +and in the example [pict-rs.toml](https://git.asonix.dog/asonix/pict-rs/src/branch/main/pict-rs.toml). + ### Improved Animation Support