Add Activity Pub endpoints cache

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2019-03-01 18:30:46 +01:00
parent b3a3001e90
commit a3ffc08e57
6 changed files with 104 additions and 43 deletions

View File

@@ -377,4 +377,8 @@ defmodule Mobilizon.Actors.Actor do
name -> name
end
end
def clear_cache(%Actor{preferred_username: preferred_username, domain: nil}) do
Cachex.del(:activity_pub, "actor_" <> preferred_username)
end
end