Skip to content

Request: Ability to modify (or add) a store after initialization #101

@renglish-rs

Description

@renglish-rs

I really love BentoCache so far, however I've found one really big pain point for me that I'd love to have a workaround for...

Because BentoCache requires stores to be configured ahead of time as part of new BentoCache({}) it's difficult to setup optional drivers

My specific use case is a shared package between my microservices, where I've done all the driver pre-configuring, so that my services can just import the shared package and pick what drivers they want and it will configure them for it using shared configurations. I wanted to be able to just import the drivers that service is interested in (like redis) instead of making all of the drivers packages required.... To do this, you have to use await import()... But this also adds complexity as now you can't have BentoCache created synchronously

I know this is probably an edge case, but I figured I would suggest it either way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions