forked from AkkomaGang/akkoma
Various runtime configuration fixes
This commit is contained in:
parent
fbc3f2893a
commit
bcecdc3ab1
9 changed files with 26 additions and 22 deletions
|
|
@ -31,10 +31,12 @@ defmodule Pleroma.Object do
|
|||
def normalize(ap_id) when is_binary(ap_id), do: Object.get_by_ap_id(ap_id)
|
||||
def normalize(_), do: nil
|
||||
|
||||
def get_cached_by_ap_id(ap_id) do
|
||||
if Mix.env() == :test do
|
||||
if Mix.env() == :test do
|
||||
def get_cached_by_ap_id(ap_id) do
|
||||
get_by_ap_id(ap_id)
|
||||
else
|
||||
end
|
||||
else
|
||||
def get_cached_by_ap_id(ap_id) do
|
||||
key = "object:#{ap_id}"
|
||||
|
||||
Cachex.fetch!(:object_cache, key, fn _ ->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue