Ejemplo n.º 1
0
        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"));
        }
Ejemplo n.º 2
0
        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));
            }
        }
Ejemplo n.º 4
0
        public object Data(string refdata)
        {
            var cachedData = AppStartCache.GetCachedData(refdata);

            if (cachedData.Item1)
            {
                return(cachedData.Item2);
            }
            else
            {
                return(controller.Data(refdata));
            }
        }