refactor Cache KeyGenerator