[cache_tools] Optimizations.