What I"m doing now (returning None) is already fairly magical. The problem is that timeout=0 (or less) is what pylibmc sets as "never expire," so I can't think of a good way to--by only modifying what timeout is passed via _get_memcache_timeout--mimic the behavior of python-memcached
-Jacob On Dec 1, 3:55 pm, Robert Coup <robert.c...@koordinates.com> wrote: > Hi Jacob, > > On Thu, Dec 2, 2010 at 8:05 AM, Jacob Burch <jacobbu...@gmail.com> wrote: > > > The problem is I can't think of a good way to force instant-expiring > > sets in pylibmc. The only way to fake the response is to alter the > > actual return value. 0 and all negative numbers, in pylibmc, set for > > never expire. And even a timeout of 1 second currently causes the > > cache template tag tests to fail. > > Can't you just no-op a timeout=0 in the django backend, regardless of the > actual memcache lib in use? ie. never send the 'set' command to > pylibmc/python-memcache... > > Hmm. On further thinking, make it into a 'delete' call so any existing entry > will be expired instantly. Maybe that's getting too magical? > > Rob :) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-develop...@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.