fixed review comments. caching the value of ttl related constants and encapsulating in methods