feat: reset proxy cache with sigusr2
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good

This commit is contained in:
2025-03-18 11:35:15 +01:00
parent 8b132dddd4
commit 1af7248a6f
6 changed files with 68 additions and 14 deletions

View File

@ -28,6 +28,11 @@ func (c *Cache[K, V]) Set(key K, value V) {
c.values.Set(key, value)
}
func (c *Cache[K, V]) Clear() {
c.timestamps.Clear()
c.values.Clear()
}
func NewCache[K comparable, V any](values cache.Cache[K, V], timestamps cache.Cache[K, time.Time], ttl time.Duration) *Cache[K, V] {
return &Cache[K, V]{
values: values,