Is it possible to retrieve HttpRuntime.Cache
from another application?
i am having two applications ,
for example App-A, App-B
in App-A i am inserting values to cache
HttpRuntime.Cache.Insert(sCacheKey, sCacheValue, Nothing, Now.AddHours(CInt(System.Configuration.ConfigurationManager.AppSettings("CacheExpirationHours"))), TimeSpan.Zero)
I am not able to retrieve the values in App-B
Dim strList As String
strList = HttpRuntime.Cache.Get(sCacheKey)
it is simply returning as Nothing. what i am doing wrong?
HttpRuntime.Cache exists in the app domain, so no you can't access it from another app. You'll need to expose that cache via wcf, web api, etc if you want another app to access it. Also consider using a distributed cache.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With