Skip to content

Commit

Permalink
Disable cache (#3152)
Browse files Browse the repository at this point in the history
* disable storage provider stat cache

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* add changelog

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* only disable caching 404

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* update changelog

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

* readd changelog

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
  • Loading branch information
butonic authored Aug 16, 2022
1 parent cafeda5 commit 999fef2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions changelog/unreleased/disable-404-caching.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Bugfix: Disable caching of not found stat responses

We no longer cache not found responses to prevent concurrent requests interfering with put requests.

https://github.com/cs3org/reva/pull/3152
https://github.com/owncloud/ocis/issues/4251
2 changes: 1 addition & 1 deletion internal/grpc/services/gateway/storageprovidercache.go
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ func (c *cachedAPIClient) Stat(ctx context.Context, in *provider.StatRequest, op
switch {
case err != nil:
return nil, err
case resp.Status.Code != rpc.Code_CODE_OK && resp.Status.Code != rpc.Code_CODE_NOT_FOUND:
case resp.Status.Code != rpc.Code_CODE_OK:
return resp, nil
case key == "":
return resp, nil
Expand Down

0 comments on commit 999fef2

Please sign in to comment.