sort cache and new functions.