Пример #1
0
        public void SaveContactGridData(ContactGridViewModel model, Guid guid)
        {
            string         key         = "contactsgrid" + guid.ToString();
            DateTimeOffset offSetValue = new DateTimeOffset(DateTime.UtcNow).AddHours(10);

            cacheManager.Add(key, model, offSetValue);
        }
Пример #2
0
        public ContactGridViewModel GetGridViewModel(string key)
        {
            ContactGridViewModel model = new ContactGridViewModel();

            if (key != null)
            {
                string keyValue = "contactsgrid" + key;
                if (cacheManager.IsExists(keyValue))
                {
                    model = cacheManager.Get <ContactGridViewModel>(keyValue);
                }
            }
            return(model);
        }