What is the Different Between Cache Object and Session Object?
-
regards, Pubudu
-
regards, Pubudu
Cache An application's Cache object allows you to store and retrieve arbitrary data on subsequent requests . The cache is not specifically associated with a page or user session. It is used primarily to enhance application performance and it remains valid as long as the application domain remains active. In .NET: Cache, found as a property of the Page class (is the actual cache object associated with the application in which the page resides) Viewstate View state is for a page or control is the cumulative propery values, or view, of that page or control. This class is the primary storage mechanism for all HTML and Web server controls. It stores attribute/value pairs as strings associated with the control. It tracks changes to these attributes only after the OnInit method is executed for a page request, and save the changes to the page's or control's view state. You can read from this class during any stage of the control processing lifecycle, but you should not write to it while the control is rendering. In .NET: StateBag, found as a property of the Page class Regards, Shiby