Cookie is a set of data stored on the client, which is mainly used to save personal information such as the user name.
Session stores the dialog information.
Application is the information stored in the entire Application, which is equivalent to a global variable.
Sessions are usually used.
The differences between Session Cache and Cache are as follows:
1. The biggest difference is that the Cache provides a Cache dependency to update data, and the Session can only determine whether the Cache data is valid Based on the defined Cache time.
2. Even if the application is terminated, as long as the Cache time defined in the Cache. Add method has not expired, the cached data will still exist the next time the application is enabled. The Session cache only exists in one Session. After the Session ends, the data becomes invalid.
3. sessions are easy to lose, leading to data uncertainty. This is not the case for Cache.
4. Because the Session is loaded every time, it is not suitable for storing a large amount of information. Otherwise, the server performance will be reduced. The Cache is mainly used to store large-capacity information, such as multiple tables in the database.
5. the beta version of VS2005 provides parameters to save the cache on the hard disk. However, this function is canceled in the official version, and it is estimated that it will be implemented again in later versions. The Session can only be stored in the memory, which affects its performance.