public new void Remove(object key) { Logger.Log( "Removing item against key '" + key + "'", Microsoft.Extensions.Logging.LogLevel.Trace ); _nCache.Remove(key.ToString()); }
public object Remove(string key) { Alachisoft.NCache.Web.Caching.Cache cache = (Alachisoft.NCache.Web.Caching.Cache)_caches[_primaryCache]; if (cache != null) { return(cache.Remove(key)); } else { return(null); } }
public object Remove(string key, bool enableRetry) { object value = null; int retry = _operationRetry; do { try { value = _cache.Remove(key); break; } catch (Exception ex) { string message = ex.Message; if (message != null && !(message.ToLower().Contains("connection with server") || message.ToLower().Contains("no server is available")) || !enableRetry) { throw; } if (retry <= 0) { throw ex; } retry--; if (_operationRetryDelayInterval > 0) { Thread.Sleep(_operationRetryDelayInterval); } } }while (retry >= 0); return(value); }
public object Remove(string sessionId, string key, bool enableRetry) { Alachisoft.NCache.Web.Caching.Cache cache = null; object obj = null; _sync.AcquireReaderLock(Timeout.Infinite); try { GetCache(sessionId, key, out obj, "", "", out cache, false); if (cache != null) { return(cache.Remove(key)); } } finally { _sync.ReleaseReaderLock(); } return(null); }