Extract max timestamp retrieval for cache_key