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: [Cache] Double prefix for increment in FileHandler #8255

Merged

Conversation

il-coder
Copy link
Contributor

@il-coder il-coder commented Nov 25, 2023

Description
When using some default prefix in cache config with FileHandler being used, the increment function would save the updated result with the key having the prefix twice. To fix it, instead of passing the already prefixed key, now it is passing the non-prefixed key to the save function and save function itself appends the prefix when calling validateKey.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the bug Verified issues on the current code behavior or pull requests that will fix them label Nov 25, 2023
@kenjis kenjis changed the title fix: Double prefix for increment in cache FileHandler fix: [Cache] Double prefix for increment in FileHandler Nov 25, 2023
Copy link
Member

@kenjis kenjis left a comment

Choose a reason for hiding this comment

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

Thank you! LGTM!

and all other handlers also have this bug.

@il-coder
Copy link
Contributor Author

Thank you! LGTM!

Welcome

and all other handlers also have this bug.

No, other handlers call their extension/library implementation functions. I was working with redis extension and it worked fine. But with file handler, I was facing the issue.

@kenjis kenjis merged commit b835455 into codeigniter4:develop Nov 27, 2023
65 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants