After Clear Cache run come important command

Hi,

i put some data in cache. those data is heavy. problem is when i clear the cache it take time to load. so i want when the cache be clear some specific command be executed. how can i do this.

Thanks