且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

拦截路线创建控制器之前,

更新时间:2023-11-21 15:39:04

您可以在Global.asax中BeginRequest事件做到这一点。我们这样做的GetVaryByCustomString因为我们使用输出缓存,需要不同的缓存设置为每​​种语言。

You could do it in the BeginRequest event on Global.asax. We do it on the GetVaryByCustomString since we use output cache and need to set a different cache to each language.