modify cache to handle 0 for ttl as no expiration
fix test to use explicit 0 for cache ttl