Cherry-pick 776ceefa to add an option for cache.{min,max}_ttl()
cache.{min,max}_ttl()
Fixes #120 (closed)