asp.net-mvc – 使用Asp.net MVC 4中的OutputCacheAttribute进行条件缓存

asp.net-mvc – 使用Asp.net MVC 4中的OutputCacheAttribute进行条件缓存

我正在尝试为我的操作结果实现输出缓存. 在我的操作中,根据某些业务规则返回响应.在我的回复中,我发送错误代码.如果有任何错误,我不想缓存响应. 在行动结果中 class Response { public int ErrorCode { get; set; } public string Message { get; set; }} [Ou