Skip to content

Commit

Permalink
chore: update send pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
neurosnap committed Dec 18, 2024
1 parent 19d8994 commit 3438081
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577
github.com/picosh/pobj v0.0.0-20241016194248-c39198b2ff23
github.com/picosh/pubsub v0.0.0-20241114191831-ec8f16c0eb88
github.com/picosh/send v0.0.0-20241107150437-0febb0049b4f
github.com/picosh/send v0.0.0-20241218031305-056b1fe8ff80
github.com/picosh/tunkit v0.0.0-20240905223921-532404cef9d9
github.com/picosh/utils v0.0.0-20241120033529-8ca070c09bf4
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,8 @@ github.com/picosh/pobj v0.0.0-20241016194248-c39198b2ff23 h1:NEJ5a4UXeF0/X7xmYNz
github.com/picosh/pobj v0.0.0-20241016194248-c39198b2ff23/go.mod h1:cF+eAl4G1vU+WOD8cYCKaxokHo6MWmbR8J4/SJnvESg=
github.com/picosh/pubsub v0.0.0-20241114191831-ec8f16c0eb88 h1:hdxE6rquHHw1/eeqS1b+ojLaxGtN8zOiTUclPwaVbPg=
github.com/picosh/pubsub v0.0.0-20241114191831-ec8f16c0eb88/go.mod h1:+9hDKIDHQCvGFigCVlIl589BwpT9R4boKhUVc/OgRU4=
github.com/picosh/send v0.0.0-20241107150437-0febb0049b4f h1:pdEh1Z7zH5Og9nS7jRuqwup3bcPsC6faDNQ6mgrV9ws=
github.com/picosh/send v0.0.0-20241107150437-0febb0049b4f/go.mod h1:RAgLDK3LrDK6pNeXtU9tjo28obl5DxShcTUk2nm/KCM=
github.com/picosh/send v0.0.0-20241218031305-056b1fe8ff80 h1:m0x9UOipmz0HCMNuhpzOgxRgOHefgNebmpcTwu0CwxU=
github.com/picosh/send v0.0.0-20241218031305-056b1fe8ff80/go.mod h1:RAgLDK3LrDK6pNeXtU9tjo28obl5DxShcTUk2nm/KCM=
github.com/picosh/senpai v0.0.0-20240503200611-af89e73973b0 h1:pBRIbiCj7K6rGELijb//dYhyCo8A3fvxW5dijrJVtjs=
github.com/picosh/senpai v0.0.0-20240503200611-af89e73973b0/go.mod h1:QaBDtybFC5gz7EG/9c3bgzuyW7W5W2rYLFZxWNuWk3Q=
github.com/picosh/tunkit v0.0.0-20240905223921-532404cef9d9 h1:g5oZmnDFr11HarA8IAXcc4o9PBlolSM59QIATCSoato=
Expand Down
13 changes: 8 additions & 5 deletions pgs/web.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"log/slog"
"net/http"
"net/url"
"os"
"regexp"
"strings"
Expand Down Expand Up @@ -300,22 +301,24 @@ 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() {
qkey, _ := url.QueryUnescape(k)
web.Logger.Info(
"deleting key from cache",
"deleting key from surrogate cache",
"surrogateKey", surrogateKey,
"key", k,
"key", qkey,
)
storer.Delete(k)
storer.Delete(qkey)
}
}
}

qkey, _ := url.QueryUnescape(key)
web.Logger.Info(
"deleting from cache",
"surrogateKey", surrogateKey,
"key", core.MappingKeyPrefix+key,
"key", core.MappingKeyPrefix+qkey,
)
storer.Delete(core.MappingKeyPrefix + key)
storer.Delete(core.MappingKeyPrefix + qkey)
}
}
}
Expand Down

0 comments on commit 3438081

Please sign in to comment.