Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道所有关于AspNetCacheProfileAttribute. 但是有没有办法以编程方式挂钩缓存?我尝试在 global.asax 中使用 Response.Cache ,这似乎设置了正确的客户端标头,但响应从未缓存在服务器上。
AspNetCacheProfileAttribute
除非您构建自己的解决方案,否则我认为您无法做到。我刚刚检查了AspNetCahceProfileAttribute仅将内部添加CachingParameterInspector到操作调度程序的实现。这有两个问题:
AspNetCahceProfileAttribute
CachingParameterInspector
没有 API 可用于修改已分配和配置的参数检查器