#7744: cache.add() should return result --------------------------+------------------------------------------------- Reporter: qmanic | Owner: nobody Status: new | Milestone: Component: Cache system | Version: SVN Keywords: cache add | Stage: Unreviewed Has_patch: 0 | --------------------------+------------------------------------------------- Currently, cache.add() doesn't have a documented return type and for most backends doesn't return anything useful.
I think it should return ''something'', though I'm unsure as to what. For example, in the memcached libraries we call, add() returns True or False depending on whether the key gets added or not. One of the reasons behind this is so that locking can be emulated through the cache with a single add() call. Currently you'd have to add() some unique value, then get() it back out and compare the values. -- Ticket URL: <http://code.djangoproject.com/ticket/7744> Django Code <http://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 post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-updates?hl=en -~----------~----~----~----~------~----~------~--~---
