예제 #1
0
 protected virtual void SetCache(string cacheKey, IRMSEntity model)
 {
     cache.Set(cacheKey, model);
 }
예제 #2
0
        /// <summary>
        /// Cache the sighting details view model
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="model"></param>
        public void CacheSightingDetailsModel(SightingDetailsViewModel model, string userName)
        {
            string key = GetCacheKey(SightingDetailsKeyPrefix, userName);

            _cache.Set <SightingDetailsViewModel>(key, model, _settings.Value.CacheLifetimeSeconds);
        }