cache based on ttl and lru