summaryrefslogtreecommitdiffstats
path: root/src/core.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2022-12-31 09:33:23 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2022-12-31 09:33:23 +0900
commit924ffb5a35d163de8324376b24e765062c2c0f86 (patch)
treef655043fb66cccd4eba6d9d5baf1699c4e8913b8 /src/core.go
parent62c7f59b94ed5f3d8770a735c107233c6518acfb (diff)
Fix cache being immediately cleared on reload-sync
Diffstat (limited to 'src/core.go')
-rw-r--r--src/core.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.go b/src/core.go
index c6ff3dcf..0545c48c 100644
--- a/src/core.go
+++ b/src/core.go
@@ -293,7 +293,7 @@ func Run(opts *Options, version string, revision string) {
if heightUnknown && !deferred {
determine(!reading)
}
- reset := clearCache()
+ reset := !useSnapshot && clearCache()
matcher.Reset(snapshot, input(reset), false, !reading, sort, reset)
case EvtSearchNew:
@@ -318,7 +318,7 @@ func Run(opts *Options, version string, revision string) {
if !useSnapshot {
snapshot, _ = chunkList.Snapshot()
}
- reset := clearCache()
+ reset := !useSnapshot && clearCache()
matcher.Reset(snapshot, input(reset), true, !reading, sort, reset)
delay = false