Data Cache is used to store frequently used data in the Cache memory. It's much more efficient to retrieve data from the data cache instead of database or other sources. We need to use System.Web.Caching namespace. The scope of the data caching is within the application domain unlike "session". Every user is able to access this object.
When client requests to the server, server executes the stored procedure or function or select statements on the Sql Server database then it returns the response to the browser. If we run again same process will happen on the web server with sql server.
How to create data cache?
Cache ["Employee"] = "DataSet Name"
We can create data caching use Cache Keyword. It's located in the System.Web.Caching namespace. It's just like assigning value to the variable.
How to remove a Data Cache?
We can remove Data Cache manually.
-
- Cache.Remove(String key);