add some logs around the caching logic