Fix RichMedia negative cache entries

The negative cache entry was a nil value, but that is an expected response when the cache is missing an entry so it didn't work as intended.
This commit is contained in:
Mark Felder 2024-07-24 15:45:35 -04:00
commit 97d488aea3
2 changed files with 27 additions and 1 deletions

View file

@ -64,5 +64,5 @@ defmodule Pleroma.Web.RichMedia.Backfill do
defp warm_cache(key, val), do: @cachex.put(:rich_media_cache, key, val)
defp negative_cache(key, ttl \\ :timer.minutes(15)),
do: @cachex.put(:rich_media_cache, key, nil, ttl: ttl)
do: @cachex.put(:rich_media_cache, key, :error, ttl: ttl)
end