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

Be able to pass which cache (in settings.CACHES) I want to use #3

Closed
avances123 opened this issue Mar 10, 2014 · 5 comments
Closed

Comments

@avances123
Copy link

Something like bare django cache decorator, in drf-extensions:

@cache_response(cache='other_than_default')

Seems reasonable?

@chibisov
Copy link
Owner

Hi. Seems reasonable, would love to merge a pull request =)

@chibisov
Copy link
Owner

I've implemented this feature in new development version http://chibisov.github.io/drf-extensions/docs/#usage-of-the-specific-cache

@avances123
Copy link
Author

Nice!!!!!

@flisky
Copy link

flisky commented Jul 25, 2014

I need clear caches for test cases with MockRedis & drf-extensions, and eventually found that it's hardly to do with Django < 1.7.

The drf-extensions call get_cache on every decorated viewset, and cache object is in the closure without any name referenced, however the bad is, the get_cache gives non singleton result in Django (see new API for Django 1.7). It would cause many connections in production!

Any idea on this? Thanks!

@chibisov
Copy link
Owner

@flisky, please, create another issue.

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

No branches or pull requests

3 participants