public async Task <IDictionary <string, int> > GetFormLimits() { var fromCache = _cacheAccessor.GetDirectoryFormLimits(); if (fromCache.Keys.Any()) { return(fromCache); } var sublimits = await _directoryAccessor.GetFieldLengths <SubmisionDto>(); var addressLimits = await _directoryAccessor.GetFieldLengths <AddressDto>(); var emailLimits = await _directoryAccessor.GetFieldLengths <EmailDto>(); var phoneLimits = await _directoryAccessor.GetFieldLengths <PhoneDto>(); var results = Merge(emailLimits, Merge(phoneLimits, Merge(addressLimits, sublimits))); await _cacheAccessor.CacheDirectoryFormLimits(results); return(results); }