Web/App_Code/ShopCache.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Text;
using WMPT.Cache;
using WMPT.Common;
using WMPT.SQLServerDAL;
/// <summary>
///ShopCache 的摘要说明
/// </summary>
public class ShopCache
{
private static object lockHelper = new object();
/// <summary>
/// 获得推荐商家列表 使用:ShopCache.GetRecommendShopCache()
/// </summary>
/// <returns>推荐商家列表</returns>
public static string GetRecommendShopCache()
{
EasyEatCache cache = EasyEatCache.GetCacheService();//目前通过此方法调用默认的缓存处理,位于Cache->DefaultCacheStrategy.cs
string str = cache.RetrieveObject("/Shop/RecommendShopIdList") as string;
if (Utils.StrIsNullOrEmpty(str))
{
StringBuilder sb = new StringBuilder();
//到数据库读取,并存入缓存中
sb.Append("1,2,3,4,5,6,7,8,9,10");
str = sb.ToString();
cache.AddObject("/Shop/RecommendShopIdList", str);
}
return str;
}
//使用: SortedList<int, string> topicTypeList = Caches.GetTopicTypeArray();
///// <summary>
///// 获得禁止的ip列表
///// </summary>
///// <returns>禁止列表</returns>
//public static List<IpInfo> GetBannedIpList()
//{
// List<IpInfo> list = DNTCache.GetCacheService().RetrieveObject("/Forum/BannedIp") as List<IpInfo>;
// if (list == null)
// {
// list = Ips.GetBannedIpList();
// DNTCache.GetCacheService().AddObject("/Forum/BannedIp", list);
// }
// return list;
//}
后面还有 65 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
