Skip to content

Incorrect code in guide for persistence #119

@ConanChenTookMyName

Description

@ConanChenTookMyName

Describe the bug
In the guide for persistence, the code provided for setting up a custom cache seems to be incorrect.

According to the guide, ClientOptionsType's cache field should expect a function with an "instance" parameter, and that argument should then be passed into a Cache constructor. However, in the actual definition of ClientOptionsType, the cache field expects a function with no parameters.

To Reproduce
Steps to reproduce the behavior:

  1. Try the code in the guide for persistence.

Expected behavior
The guide should provide code that demonstrates the correct API usage.

Package:

  • Version 7.2.6

Additional context
The unit tests for Cache call a createCache function to set up a Client with a custom cache, but that function is only defined in "cache.utils.ts" under the "tests" folder.

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