juspay/hyperswitch

[FEATURE] move redis key creation to a common module

Open

#917 创建于 2023年4月19日

在 GitHub 查看
 (18 评论) (0 反应) (1 负责人)Rust (4,676 fork)batch import
C-refactorE-easyP-lowgood first issuehacktoberfesthelp wanted

仓库指标

Star
 (42,690 star)
PR 合并指标
 (平均合并 6天 22小时) (30 天内合并 213 个 PR)

描述

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

贡献者指南