/// <summary> /// 添加缓存 /// </summary> /// <param name="getCacheEntity">cache Entity</param> public static bool AddCacheEntity(CacheEntity getCacheEntity) { bool isCache = false; if (getCacheEntity != null) { } return isCache; }
/// <summary> /// 添加缓存 /// </summary> /// <param name="getCacheEntity">cache Entity</param> public static bool AddCacheEntity(CacheEntity getCacheEntity) { bool isCache = false; if (getCacheEntity != null) { //isCache = UniversalCommon_operator.AddIsolateStorageObj(getCacheEntity.CacheKey, getCacheEntity); } return isCache; }
/// <summary> /// 添加缓存 /// </summary> /// <param name="getCacheEntity">cache Entity</param> public static bool AddCacheEntity(CacheEntity getCacheEntity) { bool isCache = false; if (getCacheEntity != null) { } return(isCache); }
/// <summary> /// 缓存是否过期 /// </summary> /// <param name="getCacheEntity">Cache Entity</param> /// <returns>Is out Of Date</returns> public static bool CacheEntityIsOutDate(CacheEntity getCacheEntity) { bool isOutOfDate = false; if (getCacheEntity != null) { DateTime currentDate = DateTime.Now; TimeSpan getTimeSpan = currentDate - Convert.ToDateTime(getCacheEntity.StartDate); int compareValue = getTimeSpan.CompareTo(new TimeSpan(0, Convert.ToInt32(getCacheEntity.CacheDate), 0)); if (compareValue == -1) isOutOfDate = false;//未过期 else isOutOfDate = true;//过期 } return isOutOfDate; }
/// <summary> /// 缓存是否过期 /// </summary> /// <param name="getCacheEntity">Cache Entity</param> /// <returns>Is out Of Date</returns> public static bool CacheEntityIsOutDate(CacheEntity getCacheEntity) { bool isOutOfDate = false; if (getCacheEntity != null) { DateTime currentDate = DateTime.Now; TimeSpan getTimeSpan = currentDate - Convert.ToDateTime(getCacheEntity.StartDate); int compareValue = getTimeSpan.CompareTo(new TimeSpan(0, Convert.ToInt32(getCacheEntity.CacheDate), 0)); if (compareValue == -1) { isOutOfDate = false;//未过期 } else { isOutOfDate = true;//过期 } } return(isOutOfDate); }