File tree 23 files changed +45
-41
lines changed
23 files changed +45
-41
lines changed Original file line number Diff line number Diff line change @@ -952,7 +952,7 @@ experimental:
952
952
plugins:
953
953
souin:
954
954
moduleName: github.com/darkweak/souin
955
- version: v1.7.0
955
+ version: v1.7.1
956
956
```
957
957
After that you can declare either the whole configuration at once in the middleware block or by service. See the examples below.
958
958
``` yaml
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ toolchain go1.22.4
6
6
7
7
require (
8
8
github.com/beego/beego/v2 v2.1.1
9
- github.com/darkweak/souin v1.7.0
9
+ github.com/darkweak/souin v1.7.1
10
10
github.com/darkweak/souin/plugins/souin v0.0.0-00010101000000-000000000000
11
11
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
12
12
)
@@ -184,7 +184,7 @@ require (
184
184
)
185
185
186
186
replace (
187
- github.com/darkweak/souin v1.7.0 => ../..
187
+ github.com/darkweak/souin v1.7.1 => ../..
188
188
github.com/darkweak/souin/plugins/souin => ../souin
189
189
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
190
190
)
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ func (s *SouinCaddyMiddleware) parseStorages(ctx caddy.Context) {
121
121
address := redis .URL
122
122
username := ""
123
123
dbname := "0"
124
- cname := ""
124
+ cname := "souin-redis "
125
125
if c := redis .Configuration ; c != nil {
126
126
p , ok := c .(map [string ]interface {})
127
127
if ok {
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ go 1.22.1
4
4
5
5
require (
6
6
github.com/caddyserver/caddy/v2 v2.8.4
7
- github.com/darkweak/souin v1.7.0
7
+ github.com/darkweak/souin v1.7.1
8
8
github.com/darkweak/storages/core v0.0.8
9
9
)
10
10
@@ -153,4 +153,4 @@ require (
153
153
howett.net/plist v1.0.0 // indirect
154
154
)
155
155
156
- replace github.com/darkweak/souin v1.7.0 => ../..
156
+ replace github.com/darkweak/souin v1.7.1 => ../..
Original file line number Diff line number Diff line change @@ -116,6 +116,10 @@ func (s *SouinCaddyMiddleware) configurationPropertyMapper() error {
116
116
return nil
117
117
}
118
118
119
+ func isProviderEmpty (c configurationtypes.CacheProvider ) bool {
120
+ return c .Configuration == nil && c .Path == "" && c .URL == ""
121
+ }
122
+
119
123
// FromApp to initialize configuration from App structure.
120
124
func (s * SouinCaddyMiddleware ) FromApp (app * SouinApp ) error {
121
125
if s .Configuration .GetDefaultCache () == nil {
@@ -199,7 +203,7 @@ func (s *SouinCaddyMiddleware) FromApp(app *SouinApp) error {
199
203
if dc .CacheName == "" {
200
204
s .Configuration .DefaultCache .CacheName = appDc .CacheName
201
205
}
202
- if ! s . Configuration . DefaultCache . Distributed && ! dc .Olric . Found && ! dc .Redis . Found && ! dc .Etcd . Found && ! dc .Badger . Found && ! dc .Nuts . Found && ! dc .Otter . Found {
206
+ if isProviderEmpty ( dc . Badger ) && isProviderEmpty ( dc .Etcd ) && isProviderEmpty ( dc .Nats ) && isProviderEmpty ( dc .Nuts ) && isProviderEmpty ( dc .Olric ) && isProviderEmpty ( dc .Otter ) && isProviderEmpty ( dc .Redis ) {
203
207
s .Configuration .DefaultCache .Distributed = appDc .Distributed
204
208
s .Configuration .DefaultCache .Olric = appDc .Olric
205
209
s .Configuration .DefaultCache .Redis = appDc .Redis
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/chi
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
github.com/go-chi/chi/v5 v5.0.12
9
9
)
@@ -179,6 +179,6 @@ require (
179
179
)
180
180
181
181
replace (
182
- github.com/darkweak/souin v1.7.0 => ../..
182
+ github.com/darkweak/souin v1.7.1 => ../..
183
183
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
184
184
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/dotweb
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
github.com/devfeel/dotweb v1.7.21
9
9
)
@@ -180,6 +180,6 @@ require (
180
180
)
181
181
182
182
replace (
183
- github.com/darkweak/souin v1.7.0 => ../..
183
+ github.com/darkweak/souin v1.7.1 => ../..
184
184
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
185
185
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/echo
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
github.com/darkweak/storages/core v0.0.8
9
9
github.com/labstack/echo/v4 v4.11.1
@@ -182,6 +182,6 @@ require (
182
182
)
183
183
184
184
replace (
185
- github.com/darkweak/souin v1.7.0 => ../..
185
+ github.com/darkweak/souin v1.7.1 => ../..
186
186
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
187
187
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/fiber
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
github.com/gofiber/fiber/v2 v2.52.1
9
9
github.com/valyala/fasthttp v1.51.0
@@ -185,6 +185,6 @@ require (
185
185
)
186
186
187
187
replace (
188
- github.com/darkweak/souin v1.7.0 => ../..
188
+ github.com/darkweak/souin v1.7.1 => ../..
189
189
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
190
190
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/gin
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
github.com/gin-gonic/gin v1.9.1
9
9
)
@@ -196,6 +196,6 @@ require (
196
196
)
197
197
198
198
replace (
199
- github.com/darkweak/souin v1.7.0 => ../..
199
+ github.com/darkweak/souin v1.7.1 => ../..
200
200
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
201
201
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/go-zero
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
github.com/zeromicro/go-zero v1.6.2
9
9
)
@@ -199,6 +199,6 @@ require (
199
199
)
200
200
201
201
replace (
202
- github.com/darkweak/souin v1.7.0 => ../..
202
+ github.com/darkweak/souin v1.7.1 => ../..
203
203
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
204
204
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/goa
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
github.com/darkweak/storages/core v0.0.8
9
9
goa.design/goa/v3 v3.12.3
@@ -181,6 +181,6 @@ require (
181
181
)
182
182
183
183
replace (
184
- github.com/darkweak/souin v1.7.0 => ../..
184
+ github.com/darkweak/souin v1.7.1 => ../..
185
185
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
186
186
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/goyave
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
goyave.dev/goyave/v4 v4.4.11
9
9
)
@@ -186,6 +186,6 @@ require (
186
186
)
187
187
188
188
replace (
189
- github.com/darkweak/souin v1.7.0 => ../..
189
+ github.com/darkweak/souin v1.7.1 => ../..
190
190
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
191
191
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/hertz
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
)
9
9
@@ -195,6 +195,6 @@ require (
195
195
)
196
196
197
197
replace (
198
- github.com/darkweak/souin v1.7.0 => ../..
198
+ github.com/darkweak/souin v1.7.1 => ../..
199
199
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
200
200
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/kratos
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
github.com/go-kratos/kratos/v2 v2.7.0
9
9
gopkg.in/yaml.v3 v3.0.1
@@ -183,6 +183,6 @@ require (
183
183
)
184
184
185
185
replace (
186
- github.com/darkweak/souin v1.7.0 => ../..
186
+ github.com/darkweak/souin v1.7.1 => ../..
187
187
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
188
188
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/roadrunner
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin v0.0.0-00010101000000-000000000000
8
8
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
9
9
github.com/roadrunner-server/errors v1.3.0
@@ -180,7 +180,7 @@ require (
180
180
)
181
181
182
182
replace (
183
- github.com/darkweak/souin v1.7.0 => ../..
183
+ github.com/darkweak/souin v1.7.1 => ../..
184
184
github.com/darkweak/souin/plugins/souin => ../souin
185
185
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
186
186
)
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/darkweak/souin/plugins/skipper
3
3
go 1.22.1
4
4
5
5
require (
6
- github.com/darkweak/souin v1.7.0
6
+ github.com/darkweak/souin v1.7.1
7
7
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
8
8
github.com/zalando/skipper v0.16.145
9
9
)
@@ -219,6 +219,6 @@ require (
219
219
)
220
220
221
221
replace (
222
- github.com/darkweak/souin v1.7.0 => ../..
222
+ github.com/darkweak/souin v1.7.1 => ../..
223
223
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
224
224
)
Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ module github.com/darkweak/souin/plugins/souin
3
3
go 1.22.1
4
4
5
5
replace (
6
- github.com/darkweak/souin v1.7.0 => ../..
6
+ github.com/darkweak/souin v1.7.1 => ../..
7
7
github.com/darkweak/souin/plugins/souin/storages => ./storages
8
8
)
9
9
10
10
require (
11
- github.com/darkweak/souin v1.7.0
11
+ github.com/darkweak/souin v1.7.1
12
12
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
13
13
github.com/darkweak/storages/core v0.0.8
14
14
github.com/fsnotify/fsnotify v1.7.0
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ go 1.22.1
5
5
replace github.com/darkweak/souin => ../../..
6
6
7
7
require (
8
- github.com/darkweak/souin v1.7.0
8
+ github.com/darkweak/souin v1.7.1
9
9
github.com/darkweak/storages/badger v0.0.8
10
10
github.com/darkweak/storages/core v0.0.8
11
11
github.com/darkweak/storages/etcd v0.0.8
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ go 1.22.1
4
4
5
5
require (
6
6
github.com/akyoto/cache v1.0.6
7
- github.com/darkweak/souin v1.7.0
7
+ github.com/darkweak/souin v1.7.1
8
8
github.com/pquerna/cachecontrol v0.2.0
9
9
)
10
10
@@ -125,6 +125,6 @@ require (
125
125
)
126
126
127
127
replace (
128
- github.com/darkweak/souin v1.7.0 => ../..
128
+ github.com/darkweak/souin v1.7.1 => ../..
129
129
go.uber.org/zap v1.26.0 => go.uber.org/zap v1.21.0
130
130
)
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ github.com/cpuguy83/go-md2man/v2/md2man
66
66
# github.com/darkweak/go-esi v0.0.5
67
67
## explicit; go 1.18
68
68
github.com/darkweak/go-esi/esi
69
- # github.com/darkweak/souin v1.7.0 => ../..
69
+ # github.com/darkweak/souin v1.7.1 => ../..
70
70
## explicit; go 1.22.1
71
71
github.com/darkweak/souin/configurationtypes
72
72
github.com/darkweak/souin/context
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ go 1.22.1
5
5
require (
6
6
github.com/TykTechnologies/tyk v1.9.2-0.20230330071232-370295d796b5
7
7
github.com/cespare/xxhash/v2 v2.2.0
8
- github.com/darkweak/souin v1.7.0
8
+ github.com/darkweak/souin v1.7.1
9
9
github.com/darkweak/souin/plugins/souin v0.0.0-00010101000000-000000000000
10
10
github.com/patrickmn/go-cache v2.1.0+incompatible
11
11
github.com/pquerna/cachecontrol v0.2.0
@@ -182,7 +182,7 @@ require (
182
182
)
183
183
184
184
replace (
185
- github.com/darkweak/souin v1.7.0 => ../..
185
+ github.com/darkweak/souin v1.7.1 => ../..
186
186
github.com/darkweak/souin/plugins/souin => ../souin
187
187
gopkg.in/alecthomas/kingpin.v2 v2.2.6 => github.com/alecthomas/kingpin/v2 v2.3.2
188
188
)
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ go 1.22.1
4
4
5
5
require (
6
6
github.com/bnkamalesh/webgo/v6 v6.7.0
7
- github.com/darkweak/souin v1.7.0
7
+ github.com/darkweak/souin v1.7.1
8
8
github.com/darkweak/souin/plugins/souin/storages v0.0.0-00010101000000-000000000000
9
9
)
10
10
@@ -179,6 +179,6 @@ require (
179
179
)
180
180
181
181
replace (
182
- github.com/darkweak/souin v1.7.0 => ../..
182
+ github.com/darkweak/souin v1.7.1 => ../..
183
183
github.com/darkweak/souin/plugins/souin/storages => ../souin/storages
184
184
)
You can’t perform that action at this time.
0 commit comments