是否有可能从另一个应用程序中检索HttpRuntime.Cache?
我有两份申请,
例如App,App
在App中,我正在向缓存中插入值
HttpRuntime.Cache.Insert(sCacheKey, sCacheValue, Nothing, Now.AddHours(CInt(System.Configuration.ConfigurationManager.AppSettings("CacheExpirationHours"))), TimeSpan.Zero)我无法检索App-B中的值。
Dim strList As String
strList = HttpRuntime.Cache.Get(sCacheKey)它只不过是毫无意义的回归而已。我做错什么了?
发布于 2013-10-15 15:23:34
HttpRuntime.Cache存在于应用程序域中,所以不能从其他应用程序访问它。如果您想要另一个应用程序访问缓存,您需要通过wcf、web等公开该缓存。还可以考虑使用分布式缓存。
https://stackoverflow.com/questions/19384903
复制相似问题