Make static cache thread_local.