{"action":"created","issue":{"url":"https://api.github.com/repos/Suor/django-cacheops/issues/282","repository_url":"https://api.github.com/repos/Suor/django-cacheops","labels_url":"https://api.github.com/repos/Suor/django-cacheops/issues/282/labels{/name}","comments_url":"https://api.github.com/repos/Suor/django-cacheops/issues/282/comments","events_url":"https://api.github.com/repos/Suor/django-cacheops/issues/282/events","html_url":"https://github.com/Suor/django-cacheops/pull/282","id":321042716,"number":282,"title":"Make the base Redis client class a setting that defaults to StrictRedis","user":{"login":"nicwolff","id":4787,"avatar_url":"https://avatars0.githubusercontent.com/u/4787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicwolff","html_url":"https://github.com/nicwolff","followers_url":"https://api.github.com/users/nicwolff/followers","following_url":"https://api.github.com/users/nicwolff/following{/other_user}","gists_url":"https://api.github.com/users/nicwolff/gists{/gist_id}","starred_url":"https://api.github.com/users/nicwolff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicwolff/subscriptions","organizations_url":"https://api.github.com/users/nicwolff/orgs","repos_url":"https://api.github.com/users/nicwolff/repos","events_url":"https://api.github.com/users/nicwolff/events{/privacy}","received_events_url":"https://api.github.com/users/nicwolff/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-08T04:59:23Z","updated_at":"2018-05-15T01:29:45Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Suor/django-cacheops/pulls/282","html_url":"https://github.com/Suor/django-cacheops/pull/282","diff_url":"https://github.com/Suor/django-cacheops/pull/282.diff","patch_url":"https://github.com/Suor/django-cacheops/pull/282.patch"},"body":"We've been maintaining a fork of cacheops for some time which has fallen farther and farther behind your releases – if we could pass in the base Redis class we could keep most of our customizations in our Django application codebase, and it'd be much easier to keep cacheops up to date.\r\n\r\n**This change adds a `CACHEOPS_CLIENT_CLASS` setting that can be used to pass a class name to import and use instead of `redis.StrictRedis`.** Generally I expect this will be a subclass of `StrictRedis` with some customizations or enhancements, but it could be any class with the same interface."},"comment":{"url":"https://api.github.com/repos/Suor/django-cacheops/issues/comments/389013518","html_url":"https://github.com/Suor/django-cacheops/pull/282#issuecomment-389013518","issue_url":"https://api.github.com/repos/Suor/django-cacheops/issues/282","id":389013518,"user":{"login":"nicwolff","id":4787,"avatar_url":"https://avatars0.githubusercontent.com/u/4787?v=4","gravatar_id":"","url":"https://api.github.com/users/nicwolff","html_url":"https://github.com/nicwolff","followers_url":"https://api.github.com/users/nicwolff/followers","following_url":"https://api.github.com/users/nicwolff/following{/other_user}","gists_url":"https://api.github.com/users/nicwolff/gists{/gist_id}","starred_url":"https://api.github.com/users/nicwolff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicwolff/subscriptions","organizations_url":"https://api.github.com/users/nicwolff/orgs","repos_url":"https://api.github.com/users/nicwolff/repos","events_url":"https://api.github.com/users/nicwolff/events{/privacy}","received_events_url":"https://api.github.com/users/nicwolff/received_events","type":"User","site_admin":false},"created_at":"2018-05-15T01:29:45Z","updated_at":"2018-05-15T01:29:45Z","author_association":"NONE","body":"Thanks for your reply!\r\n\r\n_What issues are you going to solve with this?_\r\n\r\nWe maintain a fork of cacheops to which we've added a configurable circuit breaker and weighted read-replica randomization. I'll be happy to open pull requests for them! But in the meantime it'd facilitate customizing cacheops while still keeping up with your changes.\r\n\r\n_Why parametrize subclass instead of resulting client class?_\r\n\r\nHa, that's what everyone here asked! I didn't want to lose your `CacheopsRedis` improvements, and it seemed cleaner to pass objects one way rather than importing that class and sending a subclass back in as a setting. And maybe LazyObject scared me off. But I'll test and push that change ASAP."}}
{"actor":{"display_login":"nicwolff"}}