首页 > TAG信息列表 > outputcache

带有SqlDependency的IN运算符不起作用

sqldependency是否与IN运算符一起使用? 我的命令是: SELECT n.PublishedAt FROM dbo.Navigations n WHERE NavigationGroupId IN (SELECT ng.Id FROM dbo.NavigationGroups ng WHERE ng.SiteId = 1 AND ng.IsActive = 1

c# – 将Response.RemoveOutputCacheItem与RedisOutputCacheProvider一起使用

我正在使用Microsoft RedisOutputCacheProvider,并且有一个非常简单的PartialView,我根据当前用户的SessionId通过VaryByCustom进行缓存: [OutputCache(VaryByCustom = "User", Duration = 3600)] [ChildActionOnly] public ActionResult Notifications() { return PartialView

c# – ASP.NET MVC Web API结果的缓存

public class ValuesController : ApiController { [System.Web.Mvc.OutputCache(Duration = 3600)] public int Get(int id) { return new Random().Next(); } } 由于缓存设置为1小时,我希望Web服务器为每个具有相同输入的请求保持返回相同的数字,而不再执行