示例#1
0
 /// <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)));
 }
示例#2
0
 /// <summary>
 /// Removes interactionChannel from cache
 /// </summary>
 /// <param name="id"></param>
 public static void Flush(int id)
 {
     FlushCache(InteractionChannelCache.CacheKey(id));
 }
示例#3
0
 /// <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)));
 }