support callbacks on clear cache, support custom callbacks

test cleanup