forked from AkkomaGang/akkoma
Migrate to comeonin 4 and Cachex 3
Also fix some warning in the code and add a missing alias
This commit is contained in:
parent
413de8e4bc
commit
e55c6f311b
11 changed files with 42 additions and 48 deletions
|
|
@ -33,19 +33,15 @@ defmodule Pleroma.Object do
|
|||
else
|
||||
key = "object:#{ap_id}"
|
||||
|
||||
Cachex.get!(
|
||||
:user_cache,
|
||||
key,
|
||||
fallback: fn _ ->
|
||||
object = get_by_ap_id(ap_id)
|
||||
Cachex.fetch!(:user_cache, key, fn _ ->
|
||||
object = get_by_ap_id(ap_id)
|
||||
|
||||
if object do
|
||||
{:commit, object}
|
||||
else
|
||||
{:ignore, object}
|
||||
end
|
||||
if object do
|
||||
{:commit, object}
|
||||
else
|
||||
{:ignore, object}
|
||||
end
|
||||
)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue