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