kontent-ai / delivery-sdk-net

Kontent.ai Delivery .NET SDK

Home Page:https://www.nuget.org/packages/Kontent.Ai.Delivery

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make DistributedCacheManager more robust

gormal opened this issue · comments

Brief bug description

DistributedCacheManager can't handle failures of the underlying cache implementation.

Repro steps

  1. Failing unit test: https://github.com/kontent-ai/delivery-sdk-net/blob/cacheClient_failing_tests/Kontent.Ai.Delivery.Caching.Tests/DeliveryClientCacheTests.cs#L681

Expected behavior

DistributedCacheManager should fall back to the default client if the cache is unavailable.

DeliveryCacheOptions could be extended by one more property that would indicate that in case of failure of the underlying cache CacheManager would fall back to default DeliveryClient. Please note that this option should have an impact only on DistributedCacheManager implementation.

Also, consider logging as there should be a way to let customers know when their cache is unavailable.

Has any work been done with this issue? We have a temporary work around, but a fix in the SDK would be a much better solution.