Skip to content

Commit

Permalink
Remove redis specific workout from cache code
Browse files Browse the repository at this point in the history
This bumps the go-micro/v4/store/redis fork to include these fixes:
micro/plugins#109
micro/plugins#110

And removes the workaround of stripping the table prefixes in our
code.
  • Loading branch information
rhafer committed May 12, 2023
1 parent 562ede3 commit 7e8e2b8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
7 changes: 7 additions & 0 deletions changelog/unreleased/fix-remove-redis-workaround.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Bugfix: Remove go-micro/store/redis specific workaround

We submitted an upstream fix for an issue in the go-micro/store redis plugin.
Which allowed us to remove a redis specific workaround from the reva storage
cache implementation.

https://github.com/cs3org/reva/pull/3876
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -215,5 +215,5 @@ require (

replace (
github.com/cs3org/go-cs3apis => github.com/c0rby/go-cs3apis v0.0.0-20230110100311-5b424f1baa35
github.com/go-micro/plugins/v4/store/redis => github.com/dragonchaser/go-micro-plugins/v4/store/redis v0.0.0-20230508144354-06738dcca00f
github.com/go-micro/plugins/v4/store/redis => github.com/rhafer/go-micro-plugins/v4/store/redis v1.0.1-0.20230510130353-f6541e2f520c
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -261,8 +261,6 @@ github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUn
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/dragonchaser/go-micro-plugins/v4/store/redis v0.0.0-20230508144354-06738dcca00f h1:5siFx2qvzmMSIWJvN2JhdJmU0tlqIFzgcfOnJm8sGTg=
github.com/dragonchaser/go-micro-plugins/v4/store/redis v0.0.0-20230508144354-06738dcca00f/go.mod h1:MbCG0YiyPqETTtm7uHFmxQNCaW1o9hBoYtFwhbVjLUg=
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
Expand Down Expand Up @@ -825,6 +823,8 @@ github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0ua
github.com/prometheus/statsd_exporter v0.22.7/go.mod h1:N/TevpjkIh9ccs6nuzY3jQn9dFqnUakOjnEuMPJJJnI=
github.com/prometheus/statsd_exporter v0.22.8 h1:Qo2D9ZzaQG+id9i5NYNGmbf1aa/KxKbB9aKfMS+Yib0=
github.com/prometheus/statsd_exporter v0.22.8/go.mod h1:/DzwbTEaFTE0Ojz5PqcSk6+PFHOPWGxdXVr6yC8eFOM=
github.com/rhafer/go-micro-plugins/v4/store/redis v1.0.1-0.20230510130353-f6541e2f520c h1:c2e/k/UF31vITixuslq2y401ztbAsPDMTKIMfh26WIw=
github.com/rhafer/go-micro-plugins/v4/store/redis v1.0.1-0.20230510130353-f6541e2f520c/go.mod h1:MbCG0YiyPqETTtm7uHFmxQNCaW1o9hBoYtFwhbVjLUg=
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
github.com/rivo/uniseg v0.4.2 h1:YwD0ulJSJytLpiaWua0sBDusfsCZohxjxzVTYjwxfV8=
github.com/rivo/uniseg v0.4.2/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
Expand Down
3 changes: 0 additions & 3 deletions pkg/storage/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,6 @@ func (cache cacheStore) List(opts ...microstore.ListOption) ([]string, error) {
if err != nil {
return nil, err
}
for i, key := range keys {
keys[i] = strings.TrimPrefix(key, cache.table)
}
return keys, nil
}

Expand Down

0 comments on commit 7e8e2b8

Please sign in to comment.