What is caching?
Caching is the technique of storing frequently used items in memory so that they can be accessed more quickly
Is it session level state management or application level
What directive is used to cache a web form?
The @OutputCache page directive is used to cache a Web form in the server’s memory.
Is it possible to cache multiple responses of same web form?
You can use either VaryByParam, VaryByHeaders or VaryByCustom attributes of the outputcache directive in order to achieve this.
Is it possible to store objects in cache?
Yes for that we can use cache object of Page Class. It’s a key value pair collection.
How Page.Cache is different from application?
Cache provides features like dependencies and expiration policies. If you don’t specify expire time for the cache item, you don’t know when it will be expired. Whereas the Application object will live until the last user leaves the application. If you put an object in cache, it not guaranteed to be there when you fetch it. The cache is free to throw it away if the cache get too large which is not the case with Application object.
How to access them outside aspx?
If you are in aspx page you can access it easily using cache property of page class where as if you are in some other user defined class you can access it as HttpContext.Current.Cache.
What is the difference between HttpRuntime.Cache vs. HttpContext.Current.Cache ?
Well, both will do the same thing. But HttpRuntime.Cache is recommended one because it has a slight performance benefit plus it will also be available when you write unit tests.
See more such ASP.NET interview questions with answers from questpond.com and also there is a nice article on codeproject.com which has a great list of ASP.NET interview questions