Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable cache for not found responses #3152

Merged
merged 5 commits into from
Aug 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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