Cache.cc: Streamline algo, results in less RAM usage, no CPU increase