public async Task <List <TaskModel> > GetAllTasks() { var tasksCash = this.cache.Get <List <TaskModel> >("all_tasks"); if (tasksCash != null) { return(tasksCash); } var tasks = await planRepository.GetAllTasks().ConfigureAwait(false); this.cache.Set("all_tasks", tasks, TimeSpan.FromMinutes(1)); return(tasks); }