support callbacks on clear cache, support custom callbacks