code cleanup, honor cache mode