TTL for Dependency Injection in javascript