Add allDone callback when complete caching of array or plain object