diff --git a/cacheaside.go b/cacheaside.go index c72b488..b178198 100644 --- a/cacheaside.go +++ b/cacheaside.go @@ -310,6 +310,11 @@ func (rca *CacheAside) trySetMultiKeyFn( } }() + // Case where we were unable to get any locks + if len(lockVals) == 0 { + return res, nil + } + vals, err := fn(ctx, mapsx.Keys(lockVals)) if err != nil { return nil, err