The RedisCache has extensions on top of ICache interface such as updateTtl, increment, decrement, put(with ttl) etc.
Due to these reasons, in certain areas where these functionalities are required,
RedisCache class is directly wired up in to the code which makes Redis a mandatory requirement for the service to be up and running.
Given that Redis plays a role in performance optimizations, the service should be able to be run in degraded mode in absence of Redis.
Sample code snippet
Created a IRedisCache interface as an extension to ICache to expose Redis specific functionalities.
Additional benefits from this change
For future scenarios where a Clustered Redis could be introduced, this Cache interfaces, reduces the amount of code changes required.