adding TTL support and tests

@sectioneight mind taking a look?
let's rename this `ttl`