Description
Issue workflow progress
Progress of the issue based on the Contributor Workflow
- 1. The issue provides a reproduction available on Github, Stackblitz or CodeSandbox
Make sure to fork this template and run
yarn generate
in the terminal.Please make sure Mesh package versions under
package.json
matches yours.
- 2. A failing test has been provided
- 3. A local solution has been provided
- 4. A pull request is pending review
Describe the bug
By defining the localforage cache like this, the size is ignored:
cache:
localforage:
name: "my-cache"
size: 1000
storeName: "my-cache-store"
To Reproduce
Configure localforage as described above and then check the size of the mesh cache. It's always 4980736 which is default size for localforage.
The bug is here: https://github.com/Urigo/graphql-mesh/blob/master/packages/cache/localforage/src/index.ts#L13
config.size
is simply not used at all.
Then creation of InMemoryLRU https://github.com/Urigo/graphql-mesh/blob/master/packages/cache/localforage/src/InMemoryLRUDriver.ts#L15 has options.size = 4980736 and not 1000
Expected behavior
size should be 1000.
It also be very very useful if Mesh will log info about current configuration of the cache. Now there is no mention about cache at all.
Environment:
- OS: Mac OSX
@graphql-mesh/cli
: 0.78.28- NodeJS: 16