juspay/hyperswitch

[FEATURE] move redis key creation to a common module

Open

#917 geöffnet am 19. Apr. 2023

Auf GitHub ansehen
 (18 Kommentare) (0 Reaktionen) (1 zugewiesene Person)Rust (4.676 Forks)batch import
C-refactorE-easyP-lowgood first issuehacktoberfesthelp wanted

Repository-Metriken

Stars
 (42.690 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 6T 22h) (213 gemergte PRs in 30 T)

Beschreibung

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