示例#1
0
 public void RemoveCache(Type contentType, string ext = null)
 {
     if (_cache != null)
     {
         _cache.Remove(ResSettings.GetCacheKey(contentType, ext));
     }
 }
示例#2
0
 public void SetCache(object content, Type contentType, string ext = null)
 {
     if (_cache == null)
     {
         _cache = new Dictionary <string, object>();
     }
     _cache[ResSettings.GetCacheKey(contentType, ext)] = content;
 }
示例#3
0
        public object GetCache(Type contentType, string ext = null)
        {
            string key = ResSettings.GetCacheKey(contentType, ext);

            if (_cache != null && _cache.ContainsKey(key))
            {
                return(_cache[key]);
            }

            return(null);
        }