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中似乎無法訪問?