Skip to content

Conversation

@ddevsr
Copy link
Collaborator

@ddevsr ddevsr commented Nov 10, 2025

Description
Added config item to Redis in Cache.

Parameter:

  • Added async and persistent config item to predis handler.
  • Added persistent config item to redis handler.

Checklist:

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

@ddevsr ddevsr added enhancement PRs that improve existing functionalities 4.7 labels Nov 10, 2025
@neznaika0
Copy link
Contributor

neznaika0 commented Nov 10, 2025

Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

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

PHPRedis can also support the persistent option, so we should add it there too via pconnect().

The async option should note that it is used only with Predis.

Preferably, all these new options should be mentioned here: https://codeigniter.com/user_guide/libraries/caching.html#redis-caching


We could introduce a separate configuration parameter for Predis in the config and switch to using new Redis() in the PHPRedis implementation. This would allow us to support all available options in both clients without worrying about missing or incompatible parameters. However, this change would introduce a minor BC break. Thoughts?

@ddevsr ddevsr changed the title feat: added async & persistent options to cache predis feat: added async & persistent options to Cache Redis Nov 10, 2025
@ddevsr
Copy link
Collaborator Author

ddevsr commented Nov 10, 2025

Added for redis handler too. I want make support Sentinel, but for next PR. Maybe separate config in that PR

Copy link
Contributor

@neznaika0 neznaika0 left a comment

Choose a reason for hiding this comment

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

I don't use Redis, but it looks good.

@ddevsr
Copy link
Collaborator Author

ddevsr commented Nov 10, 2025

PR #9793 for Session

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.7 enhancement PRs that improve existing functionalities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants