Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • O OS Core Common
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 30
    • Issues 30
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Open Subsurface Data Universe Software
  • Platform
  • System
  • Lib
  • core
  • OS Core Common
  • Merge requests
  • !141

Created an interface for Redis extensions on ICache interface

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Krishna Nikhil Vedurumudi requested to merge irediscache into master Jan 28, 2022
  • Overview 3
  • Commits 1
  • Pipelines 7
  • Changes 2

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

https://community.opengroup.org/osdu/platform/security-and-compliance/entitlements/-/blob/master/provider/entitlements-v2-azure/src/main/java/org/opengroup/osdu/entitlements/v2/azure/service/GroupCacheServiceAzure.java#L29

Solution

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 Jan 28, 2022 by Krishna Nikhil Vedurumudi
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: irediscache