diff --git a/go.mod b/go.mod index c2d44dc7..531e5d40 100644 --- a/go.mod +++ b/go.mod @@ -28,7 +28,7 @@ require ( github.com/charmbracelet/promwish v0.7.0 github.com/charmbracelet/ssh v0.0.0-20240725163421-eb71b85b27aa github.com/charmbracelet/wish v1.4.3 - github.com/darkweak/souin v1.7.6-0.20241208130618-0e1579f1adc7 + github.com/darkweak/souin v1.7.5 github.com/darkweak/souin/plugins/souin/storages v1.7.5 github.com/darkweak/storages/core v0.0.11 github.com/gkampitakis/go-snaps v0.5.7 diff --git a/go.sum b/go.sum index 1805173f..750802c7 100644 --- a/go.sum +++ b/go.sum @@ -217,8 +217,8 @@ github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s= github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE= github.com/darkweak/go-esi v0.0.5 h1:b9LHI8Tz46R+i6p8avKPHAIBRQUCZDebNmKm5w/Zrns= github.com/darkweak/go-esi v0.0.5/go.mod h1:koCJqwum1u6mslyZuq/Phm6hfG1K3ZK5Y7jrUBTH654= -github.com/darkweak/souin v1.7.6-0.20241208130618-0e1579f1adc7 h1:sC801fbkJbS3E9QZYdBYgoHn/NDUaBTgeqMVYW6S0CE= -github.com/darkweak/souin v1.7.6-0.20241208130618-0e1579f1adc7/go.mod h1:PcP+hhvYOdqn4OmeScKKvit0TihYVYS1o154mhfWT/s= +github.com/darkweak/souin v1.7.5 h1:drNhZc0GhSbGcugiGfcYdLDTcx3DCZW6o13wwRj5o5Y= +github.com/darkweak/souin v1.7.5/go.mod h1:PcP+hhvYOdqn4OmeScKKvit0TihYVYS1o154mhfWT/s= github.com/darkweak/souin/plugins/souin/storages v1.7.5 h1:KlHnwecr1WVNdWJ2OfhBsY6OujWvzkomowjSoBAJgxY= github.com/darkweak/souin/plugins/souin/storages v1.7.5/go.mod h1:ok3cIKHdIWjMtM6EgC8fBwNJL9hWG3deyTwN+M0zA4g= github.com/darkweak/storages/badger v0.0.8 h1:rKVXrasVA74xgiqGRgW0kH11NUIlWwn9HiFyHUok85k= diff --git a/pgs/web.go b/pgs/web.go index b8307fd6..80927100 100644 --- a/pgs/web.go +++ b/pgs/web.go @@ -300,11 +300,21 @@ func (web *WebRouter) cacheMgmt(ctx context.Context, httpCache *middleware.Souin var mapping core.StorageMapper if e := proto.Unmarshal(b, &mapping); e == nil { for k := range mapping.GetMapping() { + web.Logger.Info( + "deleting key from cache", + "surrogateKey", surrogateKey, + "key", k, + ) storer.Delete(k) } } } + web.Logger.Info( + "deleting from cache", + "surrogateKey", surrogateKey, + "key", core.MappingKeyPrefix+key, + ) storer.Delete(core.MappingKeyPrefix + key) } }