Closed jsfenfen closed 11 years ago
This is sorta annoying using viewsets. Probably not a great way to do this, but one can hardcode a cache time for everything touched by drf by changing routers.py
ret.append(url(regex, view, name=name))
to
ret.append(url(regex, cache_page(60)(view), name=name))
(and importing the right lib). If we've got api keys, though, this is gonna cache per-api-key though, so this probably isn't quite sufficient.
Closing for now--may need to revisit / revise w/ api keys.
can we cache only certain views while using viewset?