Validate cache_for (and deprecated ttl) PYTHON-518