We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'd like to use django view-based caching to set specific cache times for my .../search and .../search/facets URLs.
How would I go about that with drf-haystack?
I tried the following based on https://www.django-rest-framework.org/api-guide/caching/ but I got errors:
class ProjectSearchViewSet(FacetMixin, HaystackViewSet): ... @method_decorator(cache_page(60 * 30)) # minutes def get(self, *args, **kwargs): super(ProjectSearchView, self).get(*args, **kwargs) @method_decorator(cache_page(60 * 30)) # minutes def list(self, *args, **kwargs): super(ProjectSearchView, self).list(*args, **kwargs)
e.g.
app_1 | File "/usr/local/lib/python2.7/site-packages/rest_framework/viewsets.py", line 116, in view app_1 | return self.dispatch(request, *args, **kwargs) app_1 | File "/usr/local/lib/python2.7/site-packages/rest_framework/views.py", line 495, in dispatch app_1 | response = self.handle_exception(exc) app_1 | File "/usr/local/lib/python2.7/site-packages/rest_framework/views.py", line 455, in handle_exception app_1 | self.raise_uncaught_exception(exc) app_1 | File "/usr/local/lib/python2.7/site-packages/rest_framework/views.py", line 466, in raise_uncaught_exception app_1 | raise exc app_1 | AttributeError: 'NoneType' object has no attribute 'streaming'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'd like to use django view-based caching to set specific cache times for my .../search and .../search/facets URLs.
How would I go about that with drf-haystack?
I tried the following based on https://www.django-rest-framework.org/api-guide/caching/ but I got errors:
e.g.
The text was updated successfully, but these errors were encountered: