Why do we need data to be cached in wisDom.net? Our data is divided into two types: 1. dynamic data. This type of data is characterized by great changes. This type of data has a large amount of data. Frequent changes 2. static data is characterized by small changes and frequent use. For example, user, role, permission, role, and other data. Therefore, we cache this part of data into the data at the beginning of the system startup. 2. cache Advantages 1. significantly reduced the number of queries to the database. Improve data access speed 2. improve data stability and availability. If there is a problem with the database, the program can still use cached data. net Cache Technology 4. wisDom. net implementation in WisDom. the Global static variables we selected in. net to implement caching. See the following class diagram and the code of DataCacheCoomon, for details, refer to the copy code public abstract class DataCacheCoomon <T> {protected static List <T> DataCacheDict = null; private static object _ obj = new object (); public DataCacheCoomon () {if (DataCacheDict = null) {lock (_ obj) {if (DataCacheDict = null) {DataCacheDict = new List <T> ();}}}} protected abstract void GetDataFromDb (); /// <summary> /// add data cache /// </summary> /// <param name = "dataItem"> </param> public void AddDataCache (T dataItem) {DataCacheDict. add (dataItem );} /// <summary> /// Delete the data cache /// </summary> /// <param name = "dataItem"> </param> public void DelDataCache (T dataItem) {DataCacheDict. remove (dataItem );} /// <summary> /// obtain the dictionary cache /// </summary> /// <returns> </returns> public List <T> GetDataCacheDict () {return DataCacheDict ;}}