summaryrefslogtreecommitdiff
path: root/cmd/krino/common.go
diff options
context:
space:
mode:
authorLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 15:16:55 +0200
committerLukasz Kasprzak <lukas@labunix.xyz>2026-09-14 15:16:55 +0200
commit0b5d0eb92c5be2f0ddb2fa73990f31e5654e57fe (patch)
tree358e331945b8206ed4a72703e3aedfe8ea7cdcdb /cmd/krino/common.go
parent1d3f2d1e4c59867024470d3444e12698b7ebb22e (diff)
downloadkrino-0b5d0eb92c5be2f0ddb2fa73990f31e5654e57fe.tar.gz
krino-0b5d0eb92c5be2f0ddb2fa73990f31e5654e57fe.zip
krino: 0.0.5 — keyword cache, t and d in reviewv0.0.5
Diffstat (limited to 'cmd/krino/common.go')
-rw-r--r--cmd/krino/common.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/krino/common.go b/cmd/krino/common.go
index 4552441..11e73c5 100644
--- a/cmd/krino/common.go
+++ b/cmd/krino/common.go
@@ -5,6 +5,7 @@ package main
import (
"fmt"
"io"
+ "path/filepath"
"strings"
"time"
@@ -30,6 +31,11 @@ func minAgeOverride(g *globals) (d time.Duration, set bool, err error) {
return d, true, nil
}
+// cacheDir is where every directory's keyword cache lives (spec §6.1).
+func cacheDir() string {
+ return filepath.Join(xdg.CacheHome(), "krino")
+}
+
// applyMinAge sets every loaded directory's min-age to d, for this run only.
func applyMinAge(e *engine.Engine, d time.Duration) {
for _, dir := range e.Dirs {