123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using System.Collections.Generic;
- using System.Web;
- namespace CB.Wap
- {
- /// <summary>
- /// SyncLocalCache 的摘要说明
- /// </summary>
- 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;
- }
- }
- }
- }
|