コード例 #1
0
        public static bool IsDisplay(CaptchaDispalyType type)
        {
            var cacheValue = MemCache.Get(GetId(type));

            if (cacheValue == null)
            {
                return(false);
            }
            return(true);
        }
コード例 #2
0
 private static string GetId(CaptchaDispalyType type)
 {
     return(CacheKey + "_" + type.ToString() + "_" + Ip);
 }
コード例 #3
0
 public static void SetHide(CaptchaDispalyType type)
 {
     MemCache.Remove(GetId(type));
 }
コード例 #4
0
 public static void SetDisplay(CaptchaDispalyType type)
 {
     MemCache.Add(GetId(type), "CaptchaDispaly", TimeSpan.FromMinutes(CaptchaShowTime));
 }