public void SetCache(string key, object value, TimeSpan timeout, ExpireType expireType = ExpireType.Absolute) { if (expireType == ExpireType.Absolute) { MemoryCache.Set(key, value, new DateTimeOffset(DateTimeExtention.GetCstTime() + timeout)); } else { MemoryCache.Set(key, value, timeout); } }
public void SetCache(string key, object value, TimeSpan timeout) { MemoryCache.Set(key, value, new DateTimeOffset(DateTimeExtention.GetCstTime() + timeout)); }