I ran into a similar use case, but I don't think it would be addressed by Ivy's TTL setting. Indeed, I don't see a way to have Ivy cope with this without a full-fledged offline mode. I could handle it if gradle let me specifically map which repositories it should search for a particular dependency.
Say I have two repositories:
I have a dependency I need from repo2. repo2 is second in the list because all the rest of my dependencies come from repo1. I build when both are online, everything works, everything is cached by ivy.
I build when both repos are offline. It finds the dependency in the ivy cache, but the debug message says its rejecting it because the cached copy was originally resolved by the wrong repo. Ivy always wants to try and find the dependency in repo1 every time, even if it was previously found in repo2 and cached. Ivy remembers the cached copy came from repo2, and it wants to try and find it in repo1 first.
It attempts to contact repo1, eventually times out, then falls back on the cached copy from repo2. So the build does succeed, it just adds a couple minutes to the build time.
If in the dependency, I could specify which repos to use, that would resolve the problem. Or if ivy just had a true offline mode...