fixed review comments. caching the value of ttl related constants and en...

...capsulating in methods