Unexpected st.cache_data behavior (not caching)

Unfortunately I cannot share my original code due to privacy issues (which is the case why I made the original “expensive function”), I did solve my problem and here is what I have learned/did:

My original code had three caching function where two of them depended on the first one.
For example:

@st.cache_data
def function_one():
    some_data = 'x.y.z'
    return some_data

@st.cache_data
def fucntion_two(var):
    my_split = var.split('.')
    return my_split

@st.cache_data
def fucntion_three(var):
    my_split_join = ' '.join(var.split('.'))
    return my_split_join


func_1 = function_one()
func_2 = function_two(func_1)
func_3 = function_three(func_1)

When I first launch the app, function_one() would take ~30 seconds and then function_two and function_three would each take ~5 seconds (obviously these are not the functions I am using). Then each time a feature was changed (radio button pressed, selectbox changed, etc.), function_one() would take nearly 0 sec, while function_two() and function_three() both took roughly the same time as the initial launch time (5 sec).

I believe this was due to loading a cache variable into another cache function. I ended up just combining the three functions and that solved the problem.

@st.cache_data
def function_one():
    some_data = 'x.y.z'
    my_split = some_data.split('.')
    my_split_join = ' '.join(some_data.split('.'))
    return some_data, my_split, my_split_join

func_1, func_2, func_3 = function_one()