Add clear_cache function to state execution module