Perf mini cache

performance improvement for key scans.