private async Task RemoveCustomIndicesAsync(T entity) { if (CustomIndexFormatters.Count < 1) { return; } foreach (var kvp in CustomIndexFormatters.Select(customIndex => customIndex(entity))) { var primaryEntityId = PrimaryEntityIdLocator(entity); var primaryCacheKey = PrimaryCacheKeyFormatter(primaryEntityId); await _appCache.RemoveFromCustomIndexAsync(kvp.Key, kvp.Value, primaryCacheKey, PartitionNameFormatter()).ConfigureAwait(false); } }