/// <summary> /// Reads the specified defined value model. /// </summary> /// <param name="restActionModel">The rest action model.</param> /// <returns></returns> public static RestActionCache Read(RestAction restActionModel) { return(GetOrAddExisting(RestActionCache.CacheKey(restActionModel.Id), () => LoadByModel(restActionModel))); }
/// <summary> /// Removes RestAction from cache /// </summary> /// <param name="id"></param> public static void Flush(int id) { FlushCache(RestActionCache.CacheKey(id)); }
/// <summary> /// Returns RestAction object from cache. If RestAction 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 RestActionCache Read(int id, RockContext rockContext = null) { return(GetOrAddExisting(RestActionCache.CacheKey(id), () => LoadById(id, rockContext))); }