Opened 17 years ago
Closed 17 years ago
#4831 closed (fixed)
Adding "add" support to the cache API
Reported by: | crazyal | Owned by: | nobody |
---|---|---|---|
Component: | Core (Cache system) | Version: | dev |
Severity: | Keywords: | cache memcached sprintsept14 | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
The Django system has a "set" function for the cache backend which works with memcached which also has a "set" function.
But memcached also has an "add" function which the Django cache backend doesn't seem to support.
The "add" function becomes important with high traffic sites. If alot of requests are coming to the server and wanting to rebuild the cache, using "set" means each request will effectively try and set the cache which becomes a problem. The "add" function means it will only add the new cache if it hasn't already been added.
Attachments (1)
Change History (6)
by , 17 years ago
Attachment: | 4831-1.diff added |
---|
follow-up: 2 comment:1 by , 17 years ago
Has patch: | set |
---|---|
Summary: | Adding "add" support to memcached cache_backend → Adding "add" support to the cache API |
Triage Stage: | Unreviewed → Design decision needed |
comment:2 by , 17 years ago
Replying to Matt McClanahan <cardinal@dodds.net>:
One thing to note about this patch is that it exposes a bug in version 1.36 of the python-memcached client from tummy.com. The add method is missing a required argument that will need to be added if people wish to use add() with that memcached backend. Example patch:
This has been fixed in 1.37.
comment:3 by , 17 years ago
Triage Stage: | Design decision needed → Ready for checkin |
---|
comment:4 by , 17 years ago
Keywords: | sprintsept14 added |
---|
comment:5 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
One thing to note about this patch is that it exposes a bug in version 1.36 of the python-memcached client from tummy.com. The add method is missing a required argument that will need to be added if people wish to use add() with that memcached backend. Example patch: