mirror of
https://git.pleroma.social/sjw/pleroma.git
synced 2024-11-16 19:36:53 +01:00
Add a fallback function to handle generic params, just in case
This commit is contained in:
parent
a76793006b
commit
a9c27e137d
@ -20,6 +20,14 @@ defmodule Pleroma.Web.Metadata do
|
||||
end)
|
||||
end
|
||||
|
||||
def get_cached_tags(params) do
|
||||
key = :erlang.term_to_binary(params)
|
||||
|
||||
Cachex.fetch!(:metadata_cache, key, fn _key ->
|
||||
{:commit, build_tags(params)}
|
||||
end)
|
||||
end
|
||||
|
||||
def build_tags(params) do
|
||||
Enum.reduce(@parsers, "", fn parser, acc ->
|
||||
rendered_html =
|
||||
|
Loading…
Reference in New Issue
Block a user