fix #4493: mass-refreshing caches won't refresh stale images
Update Javadoc
Use ImmutablePair when possible