public static bool IsDisplay(CaptchaDispalyType type) { var cacheValue = MemCache.Get(GetId(type)); if (cacheValue == null) { return(false); } return(true); }
private static string GetId(CaptchaDispalyType type) { return(CacheKey + "_" + type.ToString() + "_" + Ip); }
public static void SetHide(CaptchaDispalyType type) { MemCache.Remove(GetId(type)); }
public static void SetDisplay(CaptchaDispalyType type) { MemCache.Add(GetId(type), "CaptchaDispaly", TimeSpan.FromMinutes(CaptchaShowTime)); }