modify cache logic
and add log