From e571ca5b1a32dd2602456d962b1ecad018ced0e2 Mon Sep 17 00:00:00 2001 From: yujonglee Date: Wed, 30 Oct 2024 09:59:11 +0900 Subject: [PATCH] do not cache empty response --- core/lib/canary/interface/search.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/lib/canary/interface/search.ex b/core/lib/canary/interface/search.ex index 61a18f2d..caf9ef0e 100644 --- a/core/lib/canary/interface/search.ex +++ b/core/lib/canary/interface/search.ex @@ -21,7 +21,11 @@ defmodule Canary.Interface.Search do _ -> {:ok, result} = impl().run(project, query, opts) - set_cache(project, query, opts, result) + + if result != [] do + set_cache(project, query, opts, result) + end + {:ok, result} end end