Skip to content

Avoid raising MemcacheServerError #613

@mauromsl

Description

@mauromsl

As of Django 4.2, django.core.cache.backends.memcached.MemcachedCache has been deprecated and this library has become one of the two supported backends as well as their suggestion in the docs

While this library works basically as a drop-in replacement, we've identified one area where it behaves differently to python-memcached: exceptions such as MemcacheServerError('object too large for cache') are always raised.

For comparison, django-pylibmc will log an error instead

In order to align the behaviours, would you be open to a similar handling here?

raise MemcacheServerError(error)

We don't want to introduce a breaking change, so perhaps a new client option could work? e.g Client(domain, raise_server_errors=True)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions