Skip to content

Response caching issue #3350

@codingjoe

Description

@codingjoe

Pickel do not work since version 3.2.* on a restframework response. Thus caching responses doesn't work if you use the pickel serializer for caching.

TypeError: __new__() takes exactly 3 arguments (2 given)
  File "django/core/handlers/base.py", line 111, in get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "newrelic/hooks/framework_django.py", line 499, in wrapper
    return wrapped(*args, **kwargs)
  File "django/views/decorators/csrf.py", line 57, in wrapped_view
    return view_func(*args, **kwargs)
  File "rest_framework/viewsets.py", line 87, in view
    return self.dispatch(request, *args, **kwargs)
  File "newrelic/hooks/component_djangorestframework.py", line 27, in _nr_wrapper_APIView_dispatch_
    return wrapped(*args, **kwargs)
  File "rest_framework/views.py", line 466, in dispatch
    response = self.handle_exception(exc)
  File "rest_framework/views.py", line 463, in dispatch
    response = handler(request, *args, **kwargs)
  File "rest_framework_extensions/cache/decorators.py", line 43, in inner
    kwargs=kwargs,
  File "rest_framework_extensions/cache/decorators.py", line 60, in process_cache_response
    response = self.cache.get(key)
  File "django_redis/cache.py", line 25, in _decorator
    return method(self, *args, **kwargs)
  File "django_redis/cache.py", line 73, in get
    client=client)
  File "django_redis/client/default.py", line 205, in get
    return self.decode(value)
  File "django_redis/client/default.py", line 303, in decode
    value = self._serializer.loads(value)
  File "django_redis/serializers/pickle.py", line 43, in loads
    return pickle.loads(force_bytes(value))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy