Skip to content

Allow for targeting one Redis store while using indexes as key prefixes  #32

@FasterSpeeding

Description

@FasterSpeeding

To account for scenarios where a redis cache is already being used for other parts of a bot letting people target a single redis store while prefixing keys with indexes as an alternative approach may be helpful.

I'm thinking that with the recent addition of fb2219d redis.ResourceClient could have a toggle on it which switches it between two different key strategies where one formats all the keys as something along the lines of "{index}:{actual_id}" (where overrides don't effect the used index) while the other is just the actual id and a short hand method which sets overrides for all the known indexes so that switching over to a prefix cache implementation would look something like

cli = RedisClient(...).key_prefixing(True).override_all_indexes(int)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions