aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/activity_pub
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-12-18 17:44:46 +0100
committerlain <lain@soykaf.club>2020-12-18 17:44:46 +0100
commit713612c37725c81b0906b03528c9eaa474816c7d (patch)
tree553b3f7c24875b7ed0fbb58375dcd6904206f47e /lib/pleroma/web/activity_pub
parent9a744d49c824e0a7d9963b00893fb2091e3ac4ab (diff)
downloadpleroma-713612c37725c81b0906b03528c9eaa474816c7d.tar.gz
Cachex: Make caching provider switchable at runtime.
Defaults to Cachex.
Diffstat (limited to 'lib/pleroma/web/activity_pub')
-rw-r--r--lib/pleroma/web/activity_pub/side_effects.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/side_effects.ex b/lib/pleroma/web/activity_pub/side_effects.ex
index 8556fca1d..c947e2c24 100644
--- a/lib/pleroma/web/activity_pub/side_effects.ex
+++ b/lib/pleroma/web/activity_pub/side_effects.ex
@@ -27,6 +27,8 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
require Logger
+ @cachex Pleroma.Config.get([:cachex, :provider], Cachex)
+
def handle(object, meta \\ [])
# Task this handles
@@ -312,7 +314,7 @@ defmodule Pleroma.Web.ActivityPub.SideEffects do
{:ok, chat} = Chat.bump_or_create(user.id, other_user.ap_id)
{:ok, cm_ref} = MessageReference.create(chat, object, user.ap_id != actor.ap_id)
- Cachex.put(
+ @cachex.put(
:chat_message_id_idempotency_key_cache,
cm_ref.id,
meta[:idempotency_key]