cache: add cache_enter_time_flags
(cherry picked from commit 844aa31c6d8785e7256a84d8ee7e8ae2362f9367)