backends: pass error logger to backends

This commit is contained in:
Michael Eischer
2025-09-14 16:13:21 +02:00
parent 13f743e26b
commit 4dc71f24c5
31 changed files with 96 additions and 96 deletions

View File

@@ -161,13 +161,13 @@ func (r *Repository) packSize() uint {
}
// UseCache replaces the backend with the wrapped cache.
func (r *Repository) UseCache(c *cache.Cache) {
func (r *Repository) UseCache(c *cache.Cache, errorLog func(string, ...interface{})) {
if c == nil {
return
}
debug.Log("using cache")
r.cache = c
r.be = c.Wrap(r.be)
r.be = c.Wrap(r.be, errorLog)
}
func (r *Repository) Cache() *cache.Cache {