Exemplo n.º 1
0
        /// <summary>
        /// Removes this instance.
        /// </summary>
        public static void Remove()
        {
            RockCache.Remove(CacheKey);

            // use startDayOfWeekCache to optimize how long it takes to get the StartDayOfWeek, since will be used for all .GetSundayDate() calls (1 millions calls was taking 15seconds, but this reduces that down to 25 ms)
            startDayOfWeekCache = null;
        }
Exemplo n.º 2
0
        private void ReceiveAuthenticationCode(AuthenticationTokenReceiveContext context)
        {
            string value = RockCache.Get(context.Token).ToString();

            if (!string.IsNullOrWhiteSpace(value))
            {
                RockCache.Remove(context.Token);
                context.DeserializeTicket(value);
            }
        }
 /// <summary>
 /// Removes cached triggers.
 /// </summary>
 public static void RemoveCachedTriggers()
 {
     RockCache.Remove(CACHE_KEY);
 }
Exemplo n.º 4
0
 /// <summary>
 /// Flushes the cached HTML for a specific blockId or, if specified, a specific entityValue (Entity Context)
 /// </summary>
 /// <param name="blockId">The block identifier.</param>
 /// <param name="entityValue">The entity value.</param>
 public static void FlushCachedContent(int blockId, string entityValue)
 {
     RockCache.Remove(HtmlContentCacheKey(blockId, entityValue));
 }
Exemplo n.º 5
0
 private void ClearCache()
 {
     SyndicationFeedHelper.ClearCachedFeed(GetAttributeValue(AttributeKey.RSSFeedUrl));
     RockCache.Remove(TemplateCacheKey);
 }
Exemplo n.º 6
0
 /// <summary>
 /// Clears the specified feed from object cache.
 /// </summary>
 /// <param name="feedUrl">A <see cref="System.String"/> representing the URL of the feed.</param>
 public static void ClearCachedFeed(string feedUrl)
 {
     RockCache.Remove(GetFeedCacheKey(feedUrl));
 }
Exemplo n.º 7
0
 public static void FlushItem(string qualifiedKey)
 {
     //RockCacheManager<T>.Instance.Cache.Remove( qualifiedKey );
     RockCache.Remove(qualifiedKey);
 }
Exemplo n.º 8
0
 public static void Remove(string qualifiedKey, Func <List <string> > keyFactory)
 {
     //RockCacheManager<T>.Instance.Cache.Remove( qualifiedKey );
     RockCache.Remove(qualifiedKey);
     UpdateKeys(keyFactory);
 }
 /// <summary>
 /// Removes this instance.
 /// </summary>
 public static void Remove()
 {
     RockCache.Remove(CacheKey);
 }