using System.Web;
using CB.Cache;
namespace CB.Web.Kjh.WebServices
{
///
/// HandlerFun 的摘要说明
///
public class HandlerFun : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "text/html";
string action = context.Request.QueryString["action"].ToString().Trim();
string cachekey = context.Request.QueryString["cachekey"].ToString().Trim();
switch (action)
{
case "removecache":
RemoveCache(context, cachekey);
break;
}
}
///
/// 清空缓存
///
///
///
private void RemoveCache(HttpContext context, string cachekey)
{
if (!string.IsNullOrEmpty(cachekey))
{
CBCache.GetCacheService().RemoveObject(cachekey);
}
context.Response.Write("success");
}
public bool IsReusable
{
get
{
return false;
}
}
}
}