rewrited the code for descriptor code cache