Where does cached data is stored in Asp.Net application (heap or ram)
Where do you think the heap is? It all ends up in RAM or the Pagefile :)
Was there something else specific to this question, access times etc?
Yes i wanted to know whether stack or heap.I wanted to know how caching is faster.
Well (and this is completely simplified)
Classes (i.e. Reference Types) are stored on the heap, with a pointer to that reference type stored on that stack.
Structs/Simple Types (i.e. Value Types) are stored directly on the stack.
But with regards caching, the idea is that the value you are storing is stored in Application Memory full stop.
The benefit would be that if you have some value that you regulary use, that's stored in the Database, then you could retrieve it once, place it in cache memory, and retrieve it directly from memory on each subsequent use, instead of having to go back to your Database (or FileSystem or other relatively slow-retrieval storage medium)
Eoin is absolutely correct! Caching only means storing the data from your secondary memory or hard disk (database, files, etc) into the primary memory or application memory. It speeds up the execution because reading from app mem is faster than reading from disks. So if say a file is stored in Cache, you can read it quicker than if it wasn't and you had to read it from disk.
For more details on caching in asp.net visit this link
General idea on cache memory can be found here