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

Avoid raising MemcacheServerError #613

Open
mauromsl opened this issue Oct 2, 2024 · 0 comments
Open

Avoid raising MemcacheServerError #613

mauromsl opened this issue Oct 2, 2024 · 0 comments

Comments

@mauromsl
Copy link

mauromsl commented Oct 2, 2024

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)

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

1 participant