Make cache delete only if the element is not used for long

Hi everyone! I’m using @st.cache_data decorator to cache function calls. I’ve set the ttl and it works.
We have some pages that share the same calls and it would be very beneficial to be able to make the cache hits to be deleted only if not used for the ttl time. Basically delete not based on the hit creation time but on the last used time. Is it somehow possible with Streamlit 1.45.0?