Skip to content

Commit

Permalink
chore(pgs): cache logging
Browse files Browse the repository at this point in the history
chore(pgs): consistent pkg versions
  • Loading branch information
neurosnap committed Dec 18, 2024
1 parent cf7b590 commit 19d8994
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
10 changes: 10 additions & 0 deletions pgs/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit 19d8994

Please sign in to comment.