quickly implement trait cache