Add basic user caching.

Expires after 5 seconds.
This commit is contained in:
Roger Braun 2017-04-14 17:13:51 +02:00
commit 03ddaead7e
7 changed files with 41 additions and 4 deletions

View file

@ -184,4 +184,10 @@ defmodule Pleroma.Web.TwitterAPI.ControllerTest do
header_content = "Basic " <> Base.encode64("#{username}:#{password}")
put_req_header(conn, "authorization", header_content)
end
setup do
Supervisor.terminate_child(Pleroma.Supervisor, ConCache)
Supervisor.restart_child(Pleroma.Supervisor, ConCache)
:ok
end
end

View file

@ -190,4 +190,10 @@ defmodule Pleroma.Web.TwitterAPI.TwitterAPITest do
assert status == ActivityRepresenter.to_map(updated_activity, %{user: activity_user, for: user})
end
setup do
Supervisor.terminate_child(Pleroma.Supervisor, ConCache)
Supervisor.restart_child(Pleroma.Supervisor, ConCache)
:ok
end
end