document cache search better
move saveInDataDir into cache.r