projects
/
akkoma
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cb5182
)
Don't commit nil values in object cache.
author
Roger Braun
<roger@rogerbraun.net>
Mon, 1 May 2017 14:28:40 +0000
(16:28 +0200)
committer
Roger Braun
<roger@rogerbraun.net>
Mon, 1 May 2017 14:28:40 +0000
(16:28 +0200)
lib/pleroma/object.ex
patch
|
blob
|
history
diff --git
a/lib/pleroma/object.ex
b/lib/pleroma/object.ex
index 168843bd97a34e601594cc413e5c7f9172b9493a..949ccb0f66e172a6b4bece0983e55ef20fa52b8d 100644
(file)
--- a/
lib/pleroma/object.ex
+++ b/
lib/pleroma/object.ex
@@
-19,7
+19,14
@@
defmodule Pleroma.Object do
get_by_ap_id(ap_id)
else
key = "object:#{ap_id}"
- Cachex.get!(:user_cache, key, fallback: fn(_) -> get_by_ap_id(ap_id) end)
+ Cachex.get!(:user_cache, key, fallback: fn(_) ->
+ object = get_by_ap_id(ap_id)
+ if object do
+ {:commit, object}
+ else
+ {:ignore, object}
+ end
+ end)
end
end