diff options
author | lain <lain@soykaf.club> | 2020-05-20 10:35:36 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-20 10:35:36 +0000 |
commit | 6dd1575c64ccc2ffe82155f70935b2aa58d22684 (patch) | |
tree | 35c506f7f402592ab0489996106350b7d529084b /docs/configuration/cheatsheet.md | |
parent | c3cfe87c60c1edf046cc4656e7a7704db65a9c85 (diff) | |
parent | 376147fb828a75b5000262a376cee173bfc98551 (diff) | |
download | pleroma-6dd1575c64ccc2ffe82155f70935b2aa58d22684.tar.gz pleroma-6dd1575c64ccc2ffe82155f70935b2aa58d22684.zip |
Merge branch 'issue/1509' into 'develop'
[#1509] purge media from cache after delete
See merge request pleroma/pleroma!2539
Diffstat (limited to 'docs/configuration/cheatsheet.md')
-rw-r--r-- | docs/configuration/cheatsheet.md | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/docs/configuration/cheatsheet.md b/docs/configuration/cheatsheet.md index ce3bf3af7..9af8ee95a 100644 --- a/docs/configuration/cheatsheet.md +++ b/docs/configuration/cheatsheet.md @@ -249,6 +249,40 @@ This section describe PWA manifest instance-specific values. Currently this opti * `base_url`: The base URL to access a user-uploaded file. Useful when you want to proxy the media files via another host/CDN fronts. * `proxy_opts`: All options defined in `Pleroma.ReverseProxy` documentation, defaults to `[max_body_length: (25*1_048_576)]`. * `whitelist`: List of domains to bypass the mediaproxy +* `invalidation`: options for remove media from cache after delete object: + * `enabled`: Enables purge cache + * `provider`: Which one of the [purge cache strategy](#purge-cache-strategy) to use. + +### Purge cache strategy + +#### Pleroma.Web.MediaProxy.Invalidation.Script + +This strategy allow perform external bash script to purge cache. +Urls of attachments pass to script as arguments. + +* `script_path`: path to external script. + +Example: +```elixir +config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Script, + script_path: "./installation/nginx-cache-purge.example" +``` + +#### Pleroma.Web.MediaProxy.Invalidation.Http + +This strategy allow perform custom http request to purge cache. + +* `method`: http method. default is `purge` +* `headers`: http headers. default is empty +* `options`: request options. default is empty + +Example: +```elixir +config :pleroma, Pleroma.Web.MediaProxy.Invalidation.Http, + method: :purge, + headers: [], + options: [] +``` ## Link previews |