private static T DownloadToCache <T>(string url) { string json = HttpClientHelper.GetSingleItemRequest(url, new CancellationToken()).Result; T result = ParseJson.Parse <T>(json, 0); SaveToCache(Paths.WFCDDataPaths["Cache" + TypeOf <T>().Name], result); return(result); }
private static bool SaveToCache <T>(string path, T obj) { return(ParseJson.SaveData(path, obj)); }
private static T LoadFromCache <T>(string path) { return(ParseJson.LoadData <T>(path, 0)); }