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