Ejemplo n.º 1
0
 /// <summary>
 /// 添加缓存
 /// </summary>
 /// <param name="getCacheEntity">cache Entity</param>
 public static bool AddCacheEntity(CacheEntity getCacheEntity)
 {
     bool isCache = false;
     if (getCacheEntity != null)
     {
     }
     return isCache;
 }
Ejemplo n.º 2
0
 /// <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;
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 添加缓存
        /// </summary>
        /// <param name="getCacheEntity">cache Entity</param>
        public static bool AddCacheEntity(CacheEntity getCacheEntity)
        {
            bool isCache = false;

            if (getCacheEntity != null)
            {
            }
            return(isCache);
        }
Ejemplo n.º 4
0
        /// <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;
        }
Ejemplo n.º 5
0
        /// <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);
        }