/// <summary> /// Reads the specified model. /// </summary> /// <param name="interactionChannelModel">The model.</param> /// <param name="rockContext">The rock context.</param> /// <returns></returns> public static InteractionChannelCache Read(InteractionChannel interactionChannelModel, RockContext rockContext = null) { return(GetOrAddExisting(InteractionChannelCache.CacheKey(interactionChannelModel.Id), () => LoadByModel(interactionChannelModel))); }
/// <summary> /// Removes interactionChannel from cache /// </summary> /// <param name="id"></param> public static void Flush(int id) { FlushCache(InteractionChannelCache.CacheKey(id)); }
/// <summary> /// Returns InteractionChannel object from cache. If interactionChannel does not already exist in cache, it /// will be read and added to cache /// </summary> /// <param name="id">The identifier.</param> /// <param name="rockContext">The rock context.</param> /// <returns></returns> public static InteractionChannelCache Read(int id, RockContext rockContext = null) { return(GetOrAddExisting(InteractionChannelCache.CacheKey(id), () => LoadById(id, rockContext))); }