Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deactivate Prime fonction when cache is disabled #161

Closed
wants to merge 1 commit into from

Conversation

DblK
Copy link

@DblK DblK commented Nov 5, 2018

I recently used DataLoader and I implemented in one of my program. After implementing a lot of them I saw that I needed a huge amount of ram using the default Map implementation.
I decided to disable cache for all implementation. Nevertheless, the prime functions that I used in my code were still caching and increased the amount of ram.

After investigation, it seems that the prime function doesn't look for option.cached.

The pull request is there to solve this issue.

To reproduce the issue, you can see the section Loading by alternative keys (See README.md) and add caching false to userByIDLoader. You will see that using usernameLoader it will cache some values even if you don't want to.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling a75d8eb on DblK:feature/Handle-Cache-with-Prime into 420e62f on facebook:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants