Esempio n. 1
0
        public async Task <IEnumerable <NotificationModel> > GetNotifications()
        {
            if (cachingService.Exists(nameof(NotificationManager.GetNotifications)))
            {
                return(cachingService.Get <IEnumerable <NotificationModel> >(nameof(NotificationManager.GetNotifications)));
            }

            var notifications = await notificationServiceClient.GetNotifications();

            cachingService.Store(nameof(NotificationManager.GetNotifications), notifications);

            return(notifications);
        }