Esempio n. 1
0
 public async Task SetCacheExchangeInfo(CacheExchangeInfo exchangeInfo, int expiredInMsec)
 {
     try
     {
         await _distributedCache.SetAsync(exchangeInfo.BaseType.ToString(),
                                          ZeroFormatterSerializer.Serialize(exchangeInfo),
                                          new DistributedCacheEntryOptions
         {
             AbsoluteExpiration = DateTime.Now.AddMilliseconds(expiredInMsec)
         });
     }
     catch (InvalidOperationException ex)
     {
         _logger.LogError(ex, ex.Message);
         throw ex;
     }
 }
Esempio n. 2
0
 public async Task SetCacheExchangeInfo(CacheExchangeInfo exchangeInfo, int expiredInMsec)
 {
 }