projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added data attrs for user and tag
[akkoma]
/
lib
/
pleroma
/
object.ex
diff --git
a/lib/pleroma/object.ex
b/lib/pleroma/object.ex
index 067ecfaf4732d271f7edfa045401efe2b80d279b..03a75dfbdbbcdcf00bbf9493b1c8cc9272868266 100644
(file)
--- a/
lib/pleroma/object.ex
+++ b/
lib/pleroma/object.ex
@@
-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 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)
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 _ ->
key = "object:#{ap_id}"
Cachex.fetch!(:object_cache, key, fn _ ->