Skip to content

Allow providing a custom implementation of FeatureRequesterCache #234

@mattford

Description

@mattford

Is your feature request related to a problem? Please describe.

Currently the SDK provides an an implementation of FeatureRequesterCache based on APCU. I have a Laravel app which has it's own caching system, I can easily create an implementation of the interface to work with Laravel's caching however as far as I can tell there is no way to tell the SDK to use it.

Describe the solution you'd like

Add a way to provide an implementation of FeatureRequesterCache, for example the $options array could have a cacheProviderClass key, or the LDClient could have a method setCache

Describe alternatives you've considered

I don't believe this is possible to do currently without either forking the SDK or by doing some Reflection stuff to swap in the implementation to the private _cache property, which doesn't seem a good idea in production code.

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