Opened 14 years ago
Closed 12 years ago
#14315 closed Bug (fixed)
memcached doesn't support negative deltas for incr() and decr()
Reported by: | Michael Manfre | Owned by: | Michael Manfre |
---|---|---|---|
Component: | Core (Cache system) | Version: | 1.2 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
cache.incr() and cache.decr() fail for memcached when delta < 0.
Attachments (1)
Change History (12)
comment:1 by , 14 years ago
milestone: | → 1.3 |
---|---|
Owner: | changed from | to
Triage Stage: | Unreviewed → Ready for checkin |
comment:2 by , 14 years ago
Triage Stage: | Ready for checkin → Accepted |
---|
comment:3 by , 14 years ago
The smart_str calls were added to make the incr() and decr() functions consistent with the rest of the cache class, which enforces that keys are utf-8 strings.
comment:4 by , 14 years ago
milestone: | 1.3 → 1.4 |
---|---|
Owner: | changed from | to
smart_str shouldn't be necessary on integer operations. I'll clean it up and get it in for 1.4
comment:5 by , 14 years ago
Easy pickings: | unset |
---|---|
Patch needs improvement: | set |
Severity: | → Normal |
Type: | → Uncategorized |
django-memcached-negative-delta.diff fails to apply cleanly on to trunk
comment:6 by , 13 years ago
Type: | Uncategorized → Bug |
---|
by , 13 years ago
Attachment: | django-memcached-negative-delta.diff added |
---|
comment:8 by , 13 years ago
Owner: | changed from | to
---|---|
UI/UX: | unset |
Updated patch to trunk and removed smart_str calls.
comment:9 by , 13 years ago
Patch needs improvement: | unset |
---|
comment:10 by , 13 years ago
The test applies and the tests all pass (with the memcache tests enabled). I removed excess white space, added a second comment, and opened a pull request with the updated diff here:
comment:11 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Please don't mark your own tickets as RFC. In this case I'm not sure what's with the change to add
smart_str
calls, it's certainly untested.