agree with dan. `set(key, value, timeout)` is the normal signature.


On Tue, Nov 26, 2013 at 2:29 PM, dmyung <notifications@github.com> wrote:

> In dimagi/utils/django/cached_object.py:
>
> >          object_meta = CachedObjectMeta.make_meta(object_stream, OBJECT_ORIGINAL, metadata)
> >
> >          rcache = self.rcache
> >          object_stream.seek(0)
> > -        rcache.set(self.stream_key(OBJECT_ORIGINAL), object_stream.read())
> > -        rcache.set(self.meta_key(OBJECT_ORIGINAL), simplejson.dumps(object_meta.to_json()))
> > +        rcache.set(self.stream_key(OBJECT_ORIGINAL), object_stream.read(),
> > +                   timeout=timeout)
>
> all caches should support a timeout (we're just wrapping redis behind
> django's)
> so cache_put really just sets the timeout arg explicitly
>
> https://docs.djangoproject.com/en/1.6/topics/cache/#basic-usage
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/dimagi/dimagi-utils/pull/168/files#r7931928>
> .
>