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: return at least one in sizeCalculation #10832

Merged
merged 1 commit into from
Aug 13, 2022

Conversation

oplik0
Copy link
Contributor

@oplik0 oplik0 commented Aug 13, 2022

if post content is empty post cache should still consider its size to be one. Required since lru-cache only accepts positive integers in as return value of sizeCalulation.

Unless I missed something, post cache is the only cache instance in NodeBB that uses maxSize and sizeCalculation, so this should be the only place this bug exists.

fixes #10831

if post content is empty post cache should still consider its size to be at least one. fixes NodeBB#10831
@barisusakli barisusakli merged commit 15ca460 into NodeBB:master Aug 13, 2022
@oplik0 oplik0 deleted the fix-cache-size-calculation branch August 13, 2022 14:02
julianlam pushed a commit that referenced this pull request Aug 15, 2022
if post content is empty post cache should still consider its size to be at least one. fixes #10831
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.

Prints internal error when posting a topic without a body
2 participants