Skip to content

Created an interface for Redis extensions on ICache interface

Krishna Nikhil Vedurumudi requested to merge irediscache into master

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.

Edited by Krishna Nikhil Vedurumudi

Merge request reports