Clear AP cache when content is updated or deleted

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-12-16 11:47:31 +01:00
parent 14176ccc89
commit 039846d465
2 changed files with 5 additions and 0 deletions

View File

@@ -249,6 +249,7 @@ defmodule Mobilizon.Actors do
case transaction do
{:ok, %{actor: %Actor{} = actor}} ->
{:ok, true} = Cachex.del(:activity_pub, "actor_#{actor.preferred_username}")
{:ok, actor}
{:error, remove, error, _} when remove in [:remove_banner, :remove_avatar] ->