Ejemplo n.º 1
0
        public static List <League> GetLeagueData()
        {
            List <League> leagueData = redis.Cache.GetObject <List <League> >("leagueData");

            if (leagueData == null)
            {
                External.GetLeagues();
                leagueData = redis.Cache.GetObject <List <League> >("leagueData");
            }

            return(leagueData);
        }
Ejemplo n.º 2
0
 public static void Initialize()
 {
     redis      = new Context("localhost:6379", new JsonSerializer());
     leagueData = External.GetLeagues();;
 }