public static void CacheReferenceData() { IRefData refData = new RefDataService(); AppStartCache.CacheData("fund", refData.Data("fund")); AppStartCache.CacheData("custodian", refData.Data("fund")); AppStartCache.CacheData("portfolio", refData.Data("fund")); AppStartCache.CacheData("broker", refData.Data("fund")); }
public static void CacheServerSideMetaInfo() { IJournalService journalService = new JournalService(); JournalMetaInputDto dto = new JournalMetaInputDto(); dto.GridName = "Journals Ledgers"; var result = journalService.GetJournalsMetaData(dto); AppStartCache.CacheData(dto.GridName, result); }
public object GetJournalsMetaData(JournalMetaInputDto obj) { var cachedData = AppStartCache.GetCachedData(obj.GridName); if (cachedData.Item1) { return(cachedData.Item2); } else { return(controller.GetJournalsMetaData(obj)); } }
public object Data(string refdata) { var cachedData = AppStartCache.GetCachedData(refdata); if (cachedData.Item1) { return(cachedData.Item2); } else { return(controller.Data(refdata)); } }