public void RemoveCache(Type contentType, string ext = null) { if (_cache != null) { _cache.Remove(ResSettings.GetCacheKey(contentType, ext)); } }
public void SetCache(object content, Type contentType, string ext = null) { if (_cache == null) { _cache = new Dictionary <string, object>(); } _cache[ResSettings.GetCacheKey(contentType, ext)] = content; }
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); }