Added log statements to track cache activity.