public Task UpsertAsync(string key, MongoCacheItem cacheItem, CancellationToken token) { return(_mongoCollection.ReplaceOneAsync(getQuery(key).Filter, cacheItem, new UpdateOptions { IsUpsert = true }, token)); }
public void Upsert(string key, MongoCacheItem cacheItem) { _mongoCollection.ReplaceOne(getQuery(key).Filter, cacheItem, new UpdateOptions { IsUpsert = true }); }