juspay/hyperswitch

[FEATURE] move redis key creation to a common module

Open

#917 opened on Apr 19, 2023

View on GitHub
 (18 comments) (0 reactions) (1 assignee)Rust (42,690 stars) (4,676 forks)batch import
C-refactorE-easyP-lowgood first issuehacktoberfesthelp wanted

Description

Feature Description

Few entities currently are stored in redis. We create a key for each entity. This key will be usually of the form {feature}_{merchant_id}_{extras}. The creation of this key is being done in multiple places. It will be better to move all of these functions to a common module, this will add uniformity and help someone to easily know the key format for a particular entity.

Possible Implementation

There can be a module that exports functions for each of the key creation. This function takes the dynamic variables ( like merchant_id and extra variables and build the key. The format of this function would be

fn create_access_token_key(arg1: String, arg2: String, ...) -> String {}

One may also think about using enums for this.

Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

Have you read the Contributing Guidelines?

Are you willing to submit a PR?

No, but I'm happy to collaborate on a PR with someone else

Contributor guide

[FEATURE] move redis key creation to a common module · juspay/hyperswitch#917 | Good First Issue