Respect cache timestamp format when giving timestamps to #cache_key
Refactor logic to grab the max time of the list of timestamp names in #cache_key

Reuse the already existing logic used for grabbing this information from
the updated columns.