Exemplo n.º 1
0
 public void Invalidate(ProxyDefinition proxy)
 {
     foreach (var p in ProxyDefinitions.Where(x => x.Key == proxy.Key))
     {
         Db.Config.Cache.InvalidateObject(p);
     }
 }
Exemplo n.º 2
0
 public void Invalidate(Game game)
 {
     var g = Games.FirstOrDefault(x => x.Id == game.Id);
     if (g == null) return;
     foreach (var s in Sets.Where(x => x.GameId == g.Id).ToArray())
     {
         Db.Config.Cache.InvalidateObject(s);
     }
     foreach (var p in ProxyDefinitions.Where(x => (Guid)x.Key == g.Id).ToArray())
     {
         Db.Config.Cache.InvalidateObject(p);
     }
     foreach (var s in Scripts.Where(x => x.GameId == g.Id).ToArray())
     {
         Db.Config.Cache.InvalidateObject(s);
     }
     Db.Config.Cache.InvalidateObject(g);
 }