mirror of
https://github.com/stashapp/stash.git
synced 2026-05-09 05:05:29 +02:00
The preceding commit added lru.Cache for the compiled-regexp cache to match the style in pkg/sqlite/regex.go. That file's use case is different: a small bounded cache serving a read-dominated workload. The auto-tag regexp cache is job-scoped (so eviction buys us nothing) and hit by every worker on every candidate (so the LRU's per-Get mutex becomes contention, measurable under the parallel worker pool). sync.Map's read-optimised path avoids the contention without changing any observable behavior. Kept as a separate commit so it can be reverted independently if upstream prefers the LRU approach — the first commit stands on its own either way. |
||
|---|---|---|
| .. | ||
| cache.go | ||
| cache_test.go | ||
| path.go | ||
| path_semantic_test.go | ||
| path_test.go | ||
| scraped.go | ||