Example #1
0
        public void ForceExpireModels<T>(IEnumerable<T> models = null) where T : MappableModel
        {
            List<T> expireList;
            if (models != null)
            {
                expireList = models.ToList();
            }
            else
            {
                expireList = ModelCache.GetOfType<T>().ToList();
            }

            expireList.Where(x => x != null).ForEach(x => x.IsExpired = true);
        }
Example #2
0
 public void ForceExpireModels<T>(IEnumerable<long[]> modelIds) where T : MappableModel
 {
     ForceExpireModels<T>(ModelCache.GetOfType<T>().Where(x => modelIds.Any(y => y.SequenceEqual(x.ModelId))).ToList());
 }