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

Can't use URL and PASSWORD in the config at the same time #566

Open
dschmide opened this issue May 16, 2024 · 0 comments
Open

Can't use URL and PASSWORD in the config at the same time #566

dschmide opened this issue May 16, 2024 · 0 comments

Comments

@dschmide
Copy link

dschmide commented May 16, 2024

When defining a password and URL in the config, only the URL will be used

The following config will not work as expected, no password will be used.

config = {
'CACHE_TYPE': 'RedisCache',
'CACHE_REDIS_URL': 'redis://localhost:6379/0',
'CACHE_REDIS_PASSWORD': 'test'
}

It is unintuitive that the password is ignored even though it is defined in the config. If this is intended, the documentation should reflect that the URL always takes precedence and parameters that are defined by the URL are ignored (such as host, port, db and password).
Maybe the individual parameters should be dropped entirely in favor of using the URL as the only way to make a connection to avoid confusion, or a warning should be thrown when both parameters are used at the same time.

Environment:

  • Python version: 3.9
  • Flask-Caching version: 2.3.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant