Record niagara sim cache in sequencer from cpp or python

Hello,
I’m trying to add a Niagara cache track on specific component to the sequencer, and run a recording in any possible way, preferring Python.
I tried to work with the function capture_niagara_sim_cache_immediate but it did not activate the recording on the sim cache.
Looking for something similar to click on the red button
image

Does anyone have an idea how to do this?