Is there a way in ASP.net to cache something to memory say x=”foo”, such that any session can access that cache? Due to contraints, I have to use memory and can’t store this in a database or file system. It’s fairly volatile and does not need to hang around for a long time.
Share
You can use this piece of code to store on the Cache some data for 30 minutes (absolute expiration)
On this MSDN article you have a lot of information about how to use the Cache object
If you’re not using a web farm or a web garden the cache object object is global for ALL your web sessions.