public async Task <PaginatedList <ContactDto> > Handle(FilterQuery query, CancellationToken cancellationToken) { var key = query.Identify(); try { _logger.LogInformation("[WLODZIMIERZ.API / Contacts] Reading from the cache: {Name} {@Query}", nameof(FilterQuery), query); return(await ReadFromCache(key)); } catch (NotFoundException) { _logger.LogWarning("[WLODZIMIERZ.API / Contacts] No entry found for the passed key in the cache"); _logger.LogInformation("[WLODZIMIERZ.API / Contacts] Reading from the database: {Name} {@Query}", nameof(FilterQuery), query); return(await ReadFromDatabase(query, key)); } }