Ejemplo n.º 1
0
 public static void ExpireTokenForKey(string key)
 {
     if (!string.IsNullOrEmpty(key))
     {
         CacheCancellableTokensRegistry.TryCancelToken(GenerateRegionTokenKey(key));
     }
 }
 public static IChangeToken CreateChangeTokenForKey(string key)
 {
     if (string.IsNullOrEmpty(key))
     {
         throw new ArgumentNullException(nameof(key));
     }
     return(new CompositeChangeToken(new[] { CreateChangeToken(), CacheCancellableTokensRegistry.CreateChangeToken(GenerateRegionTokenKey(key)) }));
 }
        public static void ExpireTokenForKey(string key)
        {
            if (string.IsNullOrEmpty(key))
            {
                throw new ArgumentNullException(nameof(key));
            }

            CacheCancellableTokensRegistry.TryCancelToken(GenerateRegionTokenKey(key));
        }
 public static void ExpireRegion()
 {
     CacheCancellableTokensRegistry.TryCancelToken(GenerateRegionTokenKey());
 }
 public static IChangeToken CreateChangeToken()
 {
     return(CacheCancellableTokensRegistry.CreateChangeToken(GenerateRegionTokenKey()));
 }