Add handle_language and handle_project for flush_cache and refresh_stats commands
Implement optimized rest of refresh stats machinary