From 90c4bed0af40911e0f8a28743814e4c07e91e9ae Mon Sep 17 00:00:00 2001 From: lain Date: Fri, 4 May 2018 21:15:39 +0200 Subject: Don't expire idempotency cache for five minutes. --- lib/pleroma/web/mastodon_api/mastodon_api_controller.ex | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib') diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index e2243538a..bbd16482a 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -288,6 +288,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do fallback: fn _ -> CommonAPI.post(user, params) end ) + Cachex.expire(:user_cache, "idem:#{idempotency_key}", :timer.seconds(5 * 60)) + render(conn, StatusView, "status.json", %{activity: activity, for: user, as: :activity}) end -- cgit v1.2.3