data-caching

IPad App pull and push relational data

给你一囗甜甜゛ 提交于 2019-12-12 03:40:35
问题 Im currently putting together a business app for an ipad. It will be talking to a Microsoft SQL server database. My question is what is the most efficient way to pull relational data over the line. One example is im showing a contact listing in the app. The contact record has a departmentID field (which is related to the department table) and a ContactTypeID field (which is related to the ContactType table). I am hoping that when the user first starts the app I will pull the department and

System.Web.Caching.Cache throws null exception in a model

六月ゝ 毕业季﹏ 提交于 2019-12-07 08:53:49
问题 Maybe this question should be easy, but it is not. I have read Problem Using the System.Web.Caching.Cache Class in ASP.NET. I have a singleton class: private System.Web.Caching.Cache _cache; private static CacheModel _instance = null; private CacheModel() { _cache = new Cache(); } public static CacheModel Instance { get { return _instance ?? new CacheModel(); } } public void SetCache(string key, object value){ _cache.Insert(key, value); } If, anywhere else in my code, I call the following:

System.Web.Caching.Cache throws null exception in a model

谁说我不能喝 提交于 2019-12-05 12:49:23
Maybe this question should be easy, but it is not. I have read Problem Using the System.Web.Caching.Cache Class in ASP.NET . I have a singleton class: private System.Web.Caching.Cache _cache; private static CacheModel _instance = null; private CacheModel() { _cache = new Cache(); } public static CacheModel Instance { get { return _instance ?? new CacheModel(); } } public void SetCache(string key, object value){ _cache.Insert(key, value); } If, anywhere else in my code, I call the following: CacheModel aCache = CacheModel.Instance; aCache.SetCache("mykey", new string[2]{"Val1", "Val2"}); //this