Hi! Since the contribution workflow is a bit confusing to me, I'll just leave it here. I think django's cache needs ttl (time to live) method that would return time left until specified key expires. I, for instance, needed one when writing a rate limiter. Without it I would have to store twice as much key-value pairs in cache. I ended up with a workaround that dynamically binds ttl method, but only for locmem and redis, since those are the backends I use.
Here is my workoround, maybe it will be of some use: https://github.com/p-tr0/snipets/blob/master/django_cache_ttl.py I guess the proper way would be to add a method that just raises NotImplementedError and then cover it one backend at a time. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/07aa224a-3716-48c0-8af6-757d875c6d88%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
