public void RegisterInstall(string userEmail, MobileAppType appType)
 {
     if (string.IsNullOrEmpty(userEmail))
     {
         return;
     }
     registrator.RegisterInstall(userEmail, appType);
     cache.Insert(GetCacheKey(userEmail, null), true, cacheExpiration);
     cache.Insert(GetCacheKey(userEmail, appType), true, cacheExpiration);
 }
Ejemplo n.º 2
0
        public override IEnumerable <VoipPhone> GetNumbers(params object[] ids)
        {
            var numbers = cache.Get(TenantID.ToString(CultureInfo.InvariantCulture)) as IEnumerable <VoipPhone>;

            if (numbers == null)
            {
                numbers = base.GetNumbers();
                cache.Insert(TenantID.ToString(CultureInfo.InvariantCulture), numbers, DateTime.UtcNow.Add(ExpirationTimeout));
            }

            return(ids.Any() ? numbers.Where(r => ids.Contains(r.Id) || ids.Contains(r.Number)) : numbers);
        }