Determines if caching should be used for a request.
static bool shouldUseCache(Duration? ttl) { return ttl != null; }