diff --git a/api/cache/objectslist.go b/api/cache/objectslist.go index 6fbcd7498..97ca32325 100644 --- a/api/cache/objectslist.go +++ b/api/cache/objectslist.go @@ -96,19 +96,11 @@ func (l *ObjectsListCache) GetVersions(key ObjectsListKey) []*data.NodeVersion { // Put puts a list of objects to cache. func (l *ObjectsListCache) Put(key ObjectsListKey, oids []oid.ID) error { - if len(oids) == 0 { - return fmt.Errorf("list is empty, cid: %s, prefix: %s", key.cid, key.prefix) - } - return l.cache.Set(key, oids) } // PutVersions puts a list of object versions to cache. func (l *ObjectsListCache) PutVersions(key ObjectsListKey, versions []*data.NodeVersion) error { - if len(versions) == 0 { - return fmt.Errorf("list versions is empty, cid: %s, prefix: %s", key.cid, key.prefix) - } - return l.cache.Set(key, versions) }