Esempio n. 1
0
        private List <BaseParkinfo> GetParkingBySupportAutoRefund()
        {
            Cache cache = HttpRuntime.Cache;

            if (cache["SupportAutoRefund_Parking_Cache"] != null)
            {
                return(cache["SupportAutoRefund_Parking_Cache"] as List <BaseParkinfo>);
            }
            List <BaseParkinfo> parkings = ParkingServices.GetParkingBySupportAutoRefund();

            cache.Insert("SupportAutoRefund_Parking_Cache", parkings, null, DateTime.Now.AddMinutes(5), System.Web.Caching.Cache.NoSlidingExpiration);
            return(parkings);
        }