public List <Station> GetAllStations() { if (cache.Get("Stations") == null) { cache.Add("Stations", JCDecauxItem.getAllStations(), ObjectCache.InfiniteAbsoluteExpiration); } return((List <Station>)cache.Get("Stations")); }
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)); }