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

redis master/slave connection support? #188

Closed
lishenzhi opened this issue Mar 29, 2016 · 5 comments
Closed

redis master/slave connection support? #188

lishenzhi opened this issue Mar 29, 2016 · 5 comments

Comments

@lishenzhi
Copy link

does the cacheops_redis support redis master/slave set up?

@Suor
Copy link
Owner

Suor commented Apr 7, 2016

It doesn't.

Maybe I'll be more helpful if you describe your situation and say why do you want it to use master/slave.

@Suor Suor added the discussion label Apr 7, 2016
@ttyS15
Copy link
Contributor

ttyS15 commented Apr 8, 2016

May be you will be interested in simple patch

ttyS15@dae088d

@Suor
Copy link
Owner

Suor commented Apr 8, 2016 via email

@lishenzhi
Copy link
Author

@Suor i am trying to use cacheops with redis on AWS. I have a replication group for redis, and my redis config looks like:

CACHES = {
'default': {
'BACKEND': 'django_redis.cache.RedisCache',
'LOCATION': [
"redis://master:6379/1",
"redis://replica1:6379/1",
"redis://replica2:6379/1",
],
"OPTIONS": { ... }
} }

is it possible for cacheops to use the CACHES config directly, instead of using CACHEOPS_REDIS?

@Suor
Copy link
Owner

Suor commented Apr 20, 2016

@lishenzhi using django_redis.cache.RedisCache and CACHES setting won't work. cacheops uses its own CACHEOPS_REDIS setting and its own redis client instance. Using Django caching framework is out of question - it doesn't support all required capabilities. Pretending to use it by only allowing django_redis.cache.RedisCache is confusing and have no benefits: it adds nothing useful atop pure redis client.

The approach I support for master slave is using router function. You can look up discussions in #121 and #35.

@Suor Suor closed this as completed Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants