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

fix(CachedManager): return updated data when cache is false #6685

Merged
merged 2 commits into from Sep 27, 2021

Conversation

iShibi
Copy link
Contributor

@iShibi iShibi commented Sep 24, 2021

Please describe the changes this PR makes and why it should be merged:

fixes: #6667

Under the circumstances where a structure is present in the cache, <Manager>_add() returns stale data if cache is set to false instead of returning the updated data without caching it.

Status and versioning classification:

Copy link
Member

@SpaceEEC SpaceEEC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_patch does not necessarily return the updated structure, you need to explicitly return the appropriate instance. 😅

@KokoNeotSide
Copy link

Thanks for the fix!

@iCrawl iCrawl merged commit 8426770 into discordjs:main Sep 27, 2021
@iShibi iShibi deleted the cache-stuff branch January 12, 2022 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: cache fetch option not working as intended
5 participants