Opened 19 years ago
Closed 19 years ago
#392 closed defect (fixed)
django sets up memcache incorrectly when arguments are given
Reported by: | Owned by: | Jacob | |
---|---|---|---|
Component: | Core (Cache system) | Version: | |
Severity: | normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If your settings file is specifying a cache backend and giving arguments after the '?' you will see errors like this:
MemCache: 127.0.0.1:9999: connect: Name or service not known. Marking dead.
This is because the '' is not trimmed correctly when there is a '?' in CACHE_BACKEND. Here is a patch:
Index: django/core/cache.py =================================================================== --- django/core/cache.py (revision 544) +++ django/core/cache.py (working copy) @@ -243,7 +243,7 @@ qpos = rest.find('?') if qpos != -1: params = dict(parse_qsl(rest[qpos+1:])) - host = rest[:qpos] + host = rest[2:qpos] else: params = {} if host.endswith('/'):
Note:
See TracTickets
for help on using tickets.
Fixed in [598].