fix: [OCISDEV-811] ignore write error after successful cache read (#12772)

* fix: [OCISDEV-811] ignore write error after successful cache read

* chore: add changelog entry
This commit is contained in:
Juan Pablo Villafañez authored and GitHub committed 2026-08-19 09:29:35 +02:00
1 parent b97840e770
commit be118f6bde
2 files changed
+12 -1

No files matched your search

@@ -0,0 +1,10 @@
Bugfix: Ignore write error after successful read
In the settings service, we're caching data in the NATSjs store. When reading
service information, that information is written in the cache. Previously,
failing to write that information in the cache caused an error, despite
correct information being retrieved from the service successfully. Now, if the
information isn't written in the cache, we log the failure, but return the
read information without error.
https://github.com/owncloud/ocis/pull/12772
@@ -113,7 +113,8 @@ func (c *CachedMDC) ReadDir(ctx context.Context, id string) ([]string, error) {
c.logger.Error().Err(err).Msg("ReadDir: failed to update dirs cache")
}
return s, err
// return valid data regardless of cache write failure
return s, nil
}
// MakeDirIfNotExist invalidates the cache