using System; using System.Collections.Generic; using System.Web; namespace CB.Wap { /// /// SyncLocalCache 的摘要说明 /// public class SyncLocalCache : IHttpHandler { public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; string cacheKey = context.Request.QueryString["cacheKey"]; string passKey = context.Request.QueryString["passKey"]; if (string.IsNullOrEmpty(cacheKey) || string.IsNullOrEmpty(passKey)) { context.Response.Write("CacheKey or PassKey is not null!"); return; } if (cacheKey != CB.Common.XXTEA.Decode(passKey)) { context.Response.Write("AuthCode is not valid!"); return; } //var cache = new CB.Cache.DefaultCacheStrategy(); var cache = CB.Cache.CBCache.GetCacheService(); cache.RemoveObject(cacheKey); context.Response.Write("OK"); } public bool IsReusable { get { return false; } } } }