#33092: PyMemcacheCache backend fails when running as a wsgi application with
gevent worker class
-------------------------------------+-------------------------------------
Reporter: Martijn van der | Owner: nobody
Blom |
Type: Bug | Status: closed
Component: Core (Cache system) | Version: 3.2
Severity: Normal | Resolution:
| worksforme
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Nick Pope):
* resolution: => worksforme
* status: new => closed
Comment:
I've just tested this using the following:
{{{
python==3.9.20
memcached==1.6.31
django==4.2.16
gevent==24.10.2
gunicorn==23.0.0
pymemcache==4.0.0
}}}
I was unable to reproduce the original problem using the provided
reproducer on multiple runs, with or without `{"use_pooling": True}`, so
it seems to have been resolved.
----
Replying to [comment:13 aseem-md]:
> Another issue I recently ran into is that
`pymemcache.base.client.PooledClient.gets` does not have the same
signature as `pymemcache.base.client.Client.gets`. The latter accepts
`default` as a keyword argument whereas the former does not.
>
> When combined with the recommend configuration ignoring exceptions by
setting `ignore_exc: True` you can run into a situation where calling
`gets` there is an error that gets swallowed despite the value being in
the cache and you get nothing back. This took a while to track down and
debug.
This is unrelated to the original issue. However, I'll note that there
have been a bunch of improvements in `pymemcache==4.0.0` such that the
default is returned if from `.get()` if `ignore_exc` is `True` and no
server is available. See the
[https://github.com/pinterest/pymemcache/releases/tag/v4.0.0 release
notes] for details.
--
Ticket URL: <https://code.djangoproject.com/ticket/33092#comment:15>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/01070192a12cba2b-86eea329-e17b-44d2-b8ce-f5b673880404-000000%40eu-central-1.amazonses.com.