fix(auth): restore ValidationCache.Stop

Stop was deleted while its field and doc comment stayed. The cleanup goroutine could not be stopped, and staticcheck flagged stopOnce as unused.
This commit is contained in:
2026-10-02 13:23:58 +01:00
parent a412b61d8d
commit 8112b4859f
+8
View File
@@ -117,6 +117,14 @@ func (vc *ValidationCache) Size() int {
return len(vc.cache)
}
// Stop terminates the background cleanup goroutine. Safe to call multiple
// times; subsequent calls are no-ops.
func (vc *ValidationCache) Stop() {
vc.stopOnce.Do(func() {
close(vc.stopCh)
})
}
// cleanupExpired removes expired entries periodically. Exits when Stop is
// called.
func (vc *ValidationCache) cleanupExpired() {