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

Update Cache RedisHandler to support select database. #1719

Merged
merged 2 commits into from
Feb 14, 2019
Merged

Update Cache RedisHandler to support select database. #1719

merged 2 commits into from
Feb 14, 2019

Conversation

vibbow
Copy link
Contributor

@vibbow vibbow commented Feb 13, 2019

Description
Update Cache RedisHandler to support select database.
As this feature already exist in Session RedisHandler

Checklist:

  • [ Y ] Securely signed commits
  • [ N/A ] Component(s) with PHPdocs
  • [ N/A ] Unit testing, with >80% coverage
  • [ Y ] User guide updated
  • [ Y ] Conforms to style guide


if (isset($config['database']) && ! $this->redis->select($config['database']))
{
// log_message('error', 'Cache: Redis select database failed.');
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't be commented out.

Copy link
Member

Choose a reason for hiding this comment

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

Perfect. Thanks! Merging.

Copy link
Contributor Author

@vibbow vibbow Feb 14, 2019

Choose a reason for hiding this comment

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

I had commented this out to log an error message.

But in the mean time, I notice only redis->connect will throw an RedisException if connection is failed.

redis->auth will only return a false rather an RedisException if auth is failed.

Should I enable the log for that either?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, yes, we should definitely be logging all of those situations. Though I've already merged this PR so you'll probably have to make another. Thanks!

@lonnieezell lonnieezell merged commit f3d4117 into codeigniter4:develop Feb 14, 2019
@vibbow vibbow deleted the pr_redis_select_db branch February 14, 2019 04:24
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.

2 participants