We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3abf974 commit 5427a7aCopy full SHA for 5427a7a
lib/plausible/cache.ex
@@ -62,6 +62,7 @@ defmodule Plausible.Cache do
62
@modes [:all, :updated_recently]
63
64
alias Plausible.Cache.Adapter
65
+ require Logger
66
67
@spec get(any(), Keyword.t()) :: any() | nil
68
def get(key, opts \\ []) when is_list(opts) do
@@ -182,8 +183,13 @@ defmodule Plausible.Cache do
182
183
Plausible.PromEx.Plugins.PlausibleMetrics.measure_duration(
184
telemetry_event_refresh(cache_name, mode),
185
fn ->
- items = repo().all(query)
186
- :ok = merge_items(items, opts)
+ try do
187
+ items = repo().all(query)
188
+ :ok = merge_items(items, opts)
189
+ catch
190
+ _, e ->
191
+ Logger.error("Error refreshing '#{cache_name}' - #{inspect(e)}")
192
+ end
193
end
194
)
195
0 commit comments