#32749 PyMemcacheCache uses default_noreply=False although pymemcache recommends to set to True

191 views
Skip to first unread message

Nishant Sagar

unread,
May 31, 2021, 1:10:59 AM5/31/21
to Django developers (Contributions to Django itself)
I've gone through the documentation of pymencache and if I'm not wrong its nowhere written that it recommends  default_noreply to be set to True

pymemcache documentation says noreply will not read errors returned from the memcached server.

If a function with noreply=True causes an error on the server, it will still succeed and your next call which reads a response from memcached may fail unexpectedly.

pymemcached will try to catch and stop you from sending malformed inputs to memcached, but if you are having unexplained errors, setting noreply=False may help you troubleshoot the issue.


You can also look at ticket  #29887   -- Added a cache backend for pymemcache.

It says that default_noreply has been set to false to make the behaviour consistent with the other backends and to allow the test suite to pass successfully. Currently django-pymemcache only sets the soft-deprecated serializer and deserializer options which have been superseded by serde.

Note that pymemcache.serde.pickle_serde uses pickle.HIGHEST_PROTOCOL by default which is consistent with the configuration of the python-memcached backend.


As a beginner to this project what do I supposed to do now, how can I fix this issue?

Thank you

Adam Johnson

unread,
Jun 16, 2021, 4:10:31 AM6/16/21
to django-d...@googlegroups.com
I've gone through the documentation of pymencache and if I'm not wrong its nowhere written that it recommends  default_noreply to be set to True

It's covered in the "best practices" section, which is a list of their recommendations: https://pymemcache.readthedocs.io/en/latest/getting_started.html?highlight=noreply#best-practices

As a beginner to this project what do I supposed to do now, how can I fix this issue?

The conversation on the ticket has input from several people. We need to decide what to do as a group. I've given my opinion.

--
You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-develop...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/760a175f-2111-4cf0-95f9-e735b204a8f4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages