repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
3438081
parent
19d8994
author
Eric Bower
date
2024-12-18 03:14:56 +0000 UTC
chore: update send pkg
3 files changed,  +11, -8
M go.mod
M go.sum
M go.mod
+1, -1
1@@ -43,7 +43,7 @@ require (
2 	github.com/neurosnap/go-exif-remove v0.0.0-20221010134343-50d1e3c35577
3 	github.com/picosh/pobj v0.0.0-20241016194248-c39198b2ff23
4 	github.com/picosh/pubsub v0.0.0-20241114191831-ec8f16c0eb88
5-	github.com/picosh/send v0.0.0-20241107150437-0febb0049b4f
6+	github.com/picosh/send v0.0.0-20241218031305-056b1fe8ff80
7 	github.com/picosh/tunkit v0.0.0-20240905223921-532404cef9d9
8 	github.com/picosh/utils v0.0.0-20241120033529-8ca070c09bf4
9 	github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
M go.sum
+2, -2
 1@@ -714,8 +714,8 @@ github.com/picosh/pobj v0.0.0-20241016194248-c39198b2ff23 h1:NEJ5a4UXeF0/X7xmYNz
 2 github.com/picosh/pobj v0.0.0-20241016194248-c39198b2ff23/go.mod h1:cF+eAl4G1vU+WOD8cYCKaxokHo6MWmbR8J4/SJnvESg=
 3 github.com/picosh/pubsub v0.0.0-20241114191831-ec8f16c0eb88 h1:hdxE6rquHHw1/eeqS1b+ojLaxGtN8zOiTUclPwaVbPg=
 4 github.com/picosh/pubsub v0.0.0-20241114191831-ec8f16c0eb88/go.mod h1:+9hDKIDHQCvGFigCVlIl589BwpT9R4boKhUVc/OgRU4=
 5-github.com/picosh/send v0.0.0-20241107150437-0febb0049b4f h1:pdEh1Z7zH5Og9nS7jRuqwup3bcPsC6faDNQ6mgrV9ws=
 6-github.com/picosh/send v0.0.0-20241107150437-0febb0049b4f/go.mod h1:RAgLDK3LrDK6pNeXtU9tjo28obl5DxShcTUk2nm/KCM=
 7+github.com/picosh/send v0.0.0-20241218031305-056b1fe8ff80 h1:m0x9UOipmz0HCMNuhpzOgxRgOHefgNebmpcTwu0CwxU=
 8+github.com/picosh/send v0.0.0-20241218031305-056b1fe8ff80/go.mod h1:RAgLDK3LrDK6pNeXtU9tjo28obl5DxShcTUk2nm/KCM=
 9 github.com/picosh/senpai v0.0.0-20240503200611-af89e73973b0 h1:pBRIbiCj7K6rGELijb//dYhyCo8A3fvxW5dijrJVtjs=
10 github.com/picosh/senpai v0.0.0-20240503200611-af89e73973b0/go.mod h1:QaBDtybFC5gz7EG/9c3bgzuyW7W5W2rYLFZxWNuWk3Q=
11 github.com/picosh/tunkit v0.0.0-20240905223921-532404cef9d9 h1:g5oZmnDFr11HarA8IAXcc4o9PBlolSM59QIATCSoato=
M pgs/web.go
+8, -5
 1@@ -6,6 +6,7 @@ import (
 2 	"fmt"
 3 	"log/slog"
 4 	"net/http"
 5+	"net/url"
 6 	"os"
 7 	"regexp"
 8 	"strings"
 9@@ -300,22 +301,24 @@ func (web *WebRouter) cacheMgmt(ctx context.Context, httpCache *middleware.Souin
10 					var mapping core.StorageMapper
11 					if e := proto.Unmarshal(b, &mapping); e == nil {
12 						for k := range mapping.GetMapping() {
13+							qkey, _ := url.QueryUnescape(k)
14 							web.Logger.Info(
15-								"deleting key from cache",
16+								"deleting key from surrogate cache",
17 								"surrogateKey", surrogateKey,
18-								"key", k,
19+								"key", qkey,
20 							)
21-							storer.Delete(k)
22+							storer.Delete(qkey)
23 						}
24 					}
25 				}
26 
27+				qkey, _ := url.QueryUnescape(key)
28 				web.Logger.Info(
29 					"deleting from cache",
30 					"surrogateKey", surrogateKey,
31-					"key", core.MappingKeyPrefix+key,
32+					"key", core.MappingKeyPrefix+qkey,
33 				)
34-				storer.Delete(core.MappingKeyPrefix + key)
35+				storer.Delete(core.MappingKeyPrefix + qkey)
36 			}
37 		}
38 	}