0
我有一系列这样的缓存缓存对象HttpRuntime.Cache在Global.asax中总是空
HttpRuntime.Cache.Insert(....)
我试图用一个varyByCustom
声明的用户控件,并使用此缓存的对象返回值global.asax
Public Overrides Function GetVaryByCustomString(context As HttpContext, arg As String) As String
If arg = "getCache" Then
Return HttpRuntime.Cache.Get("mainMenu_added")
End If
end function
我每次都得到一个空记录。
我在其他地方检查和缓存键确实存在,但在Global.asax中似乎无法访问?