make klabel cache definition-specific

@yilongli please review