public ProfileCache GetProfileByID(string id) { int profileID = -1; if (!Int32.TryParse(id, out profileID)) { Log.Error("Could not parse id."); return(null); } ICacheContent profileCache = this.Get(profileID); if (profileCache == null) { Log.Error("Cache did not retrieve any cacheContent."); return(null); } ProfileCache profileCacheObj = profileCache as ProfileCache; if (profileCacheObj == null) { Log.Error("CacheObject could not be passed into ProfileCache"); return(null); } return(profileCacheObj); }
public FileResult Default(int contentID) { ICacheContent content = this.MobiContext.Service.Cache.Get(contentID); if (content == null) { return(null); } return(File(content.DefaultThumbnail as byte[], "image/jpg", string.Format("{0}{1}", contentID, ".jpg"))); }
public ExpiredEventArgs(ICacheContent <TKey, TContent> content) { Content = content; }