Example #1
0
 public List <Station> GetAllStations()
 {
     if (cache.Get("Stations") == null)
     {
         cache.Add("Stations", JCDecauxItem.getAllStations(), ObjectCache.InfiniteAbsoluteExpiration);
     }
     return((List <Station>)cache.Get("Stations"));
 }
Example #2
0
        public Station GetStation(string stationId, string stationContract)
        {
            if (cache.Get(stationId + stationContract) == null)
            {
                cache.Add(stationId + stationContract, JCDecauxItem.getStationInfos(stationId, stationContract), defaultCacheItemPolicy);
            }

            return((Station)cache.Get(stationId + stationContract));
        }