WebCommon/CacheUtility.cs
(完整代码) 1KB/*********************************************************************
* CopyRight (c) 2009-2016 WMPT Teconology. All Rights Reserved.
* Function : 区域缓存代理类
* at 2010-8-21 18:53:19.
*********************************************************************/
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Web.Caching;
using WMPT.SQLServerDAL;
using WMPT.Model;
using WMPT.Cache;
namespace WMPT.WebCommon
{
/// <summary>
///SectionProxyData 的摘要说明
/// </summary>
public class CacheUtility
{
/// <summary>
/// 缓存系统参数
/// </summary>
/// <returns></returns>
public static string GetSetValue(int id)
{
string rs = "";
IList<WebBasicInfo> list = (IList<WebBasicInfo>)EasyEatCache.GetCacheService().RetrieveObject("/syspara");
if (list == null || list.Count == 0)
{
WebBasic dal = new WebBasic();
list = dal.GetAllData("");
EasyEatCache.GetCacheService().AddObject("/syspara", list, 600);
}
foreach (WebBasicInfo i in list)
{
if (i.DataId == id)
{
rs = i.Value;
}
}
return rs;
}
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
