I think it'd be good if newcache didn't extend key life. Currently, .set extends to timeout + HERD_TIMEOUT. I realize that the miss should later re-call set, but if it fails to, the key lives beyond its intended lifespan.
I think it would be good to (optionally, maybe) instead back off the given timeout so that a miss is before the given timeout.
I think it'd be good if newcache didn't extend key life. Currently, .set extends to timeout + HERD_TIMEOUT. I realize that the miss should later re-call set, but if it fails to, the key lives beyond its intended lifespan.
I think it would be good to (optionally, maybe) instead back off the given timeout so that a miss is before the given timeout.
I did this a long time ago, but shows the general idea: http://code.djangoproject.com/attachment/ticket/6199/cache_avoid_stampede.diff